File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,21 @@ Open the `dist` directory using a local webserver.
4040
4141This 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
4560We appreciate your interest! Please see the [ Dojo Meta Repository] ( https://github.com/dojo/meta#readme ) for the
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments