Skip to content

Commit 7662fb5

Browse files
authored
Update README's build steps (dojo#270)
1 parent c25c361 commit 7662fb5

6 files changed

Lines changed: 20 additions & 5 deletions

File tree

custom-element-menu/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,21 @@ Open the `dist` directory using a local webserver.
4040

4141
This package demonstrates how to use Dojo 2 widgets as a custom element.
4242

43+
Notice `src/widgets/createMenuElement.ts` and `src/widgets/createMenuItemElement.ts` describe the custom elements.
44+
To build the custome elements, the `npm run build` command above first runs `dojo build` and then
45+
46+
```shell
47+
dojo build --element=src/widgets/createMenuItemElement.ts
48+
dojo build --element=src/widgets/createMenuElement.ts
49+
```
50+
Those CLI build commands use webpack to create bundles in the `dist` directory for each custom element.
51+
To use those custom elements in your own HTML page, import the custom elements' HTML files:
52+
53+
```html
54+
<link rel="import" href="./dist/menu/menu.html" />
55+
<link rel="import" href="./dist/menu-item/menu-item.html" />
56+
```
57+
4358
## How do I contribute?
4459

4560
We appreciate your interest! Please see the [Dojo Meta Repository](https://github.com/dojo/meta#readme) for the

custom-element-menu/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "custom-element",
33
"version": "1.0.0",
44
"scripts": {
5-
"build": "./node_modules/.bin/dojo build && ./node_modules/.bin/dojo build --element=src/widgets/createMenuItemElement.ts && ./node_modules/.bin/dojo build --element=src/widgets/createMenuElement.ts"
5+
"build": "dojo build && dojo build --element=src/widgets/createMenuItemElement.ts && dojo build --element=src/widgets/createMenuElement.ts"
66
},
77
"dependencies": {
88
"@dojo/core": "~0.2.0",

todo-mvc-kitchensink/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "TodoMVC using Dojo 2",
55
"main": "index.js",
66
"scripts": {
7-
"build": "./node_modules/.bin/dojo build"
7+
"build": "dojo build"
88
},
99
"repository": {
1010
"type": "git",

todo-mvc-tsx/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "TodoMVC using Dojo2",
55
"main": "index.js",
66
"scripts": {
7-
"build": "./node_modules/.bin/dojo build"
7+
"build": "dojo build"
88
},
99
"repository": {
1010
"type": "git",

todo-mvc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "TodoMVC using Dojo2",
55
"main": "index.js",
66
"scripts": {
7-
"build": "./node_modules/.bin/dojo build"
7+
"build": "dojo build"
88
},
99
"repository": {
1010
"type": "git",

widget-showcase/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dojo2-widget-showcase",
33
"version": "1.0.0",
44
"scripts": {
5-
"build": "./node_modules/.bin/dojo build"
5+
"build": "dojo build"
66
},
77
"dependencies": {
88
"@dojo/core": "~0.1.0",

0 commit comments

Comments
 (0)