- Modify the components to use shadow dom
- ☑ CSS inside the html affecting other components
- ☐ DRY again
- ☐ Setting the innerHTML from the html file
- ☐ Line to Define the component. It is kind of repeating; isn't it?
- ☐ Limitations of the current model
- DRY again
- Setting the innerHTML from the html file
- Line to Define the component. It is kind of repeating; isn't it?
- Limitations of the current model
- Its time for TypeScript!
- Refactor the header component
- Move html to a different file
- Webpack loader configuration for html import
npm install -D html-loader
- changes in webpack.config.js
- Refactor the navigation component
- ☑ Writing html in javascript! Not feeling good.
- CSS inside the html affecting other components
- DRY again
- Setting the innerHTML from the html file
- Line to Define the component. It is kind of repeating; isn't it?
- Limitations of the current modal
- Shadow DOM
- Define process should be inside the component itself
- Move
customElements.define
into component js file - Find a workaround for tree-shaking
- Move
- ComponentModule will be just a module that wraps a set of components
- Is this the same reason why angular also has a component array in the module?
-
☐ Writing html in javascript! Not feeling good.
-
☑ There is a master list of components; earlier model was better.
- Writing html in javascript! Not feeling good.
- html in '.html' file & javascript in '.js' file
- Introducing
dist
folder for output- Stategy for copying static files
- install webpack plugin
npm install -D copy-webpack-plugin
- webpack config changes
- install webpack plugin
- Stategy for copying static files
- Compile other applications as well
- Use Logger
- Configuring Webpack
- Refer web components the same way
- ☑ Have to refering each component js files and its reference files into html
- ☐ Writing html in javascript! Not feeling good.
-
Writing html in javascript! Not feeling good.
-
There is a master list of components; earlier model was better.
- Get rid of the master list of components
- Module bundler need a way to identify the dependencies
- Useful by the IDE as well
- ES Modules
- Logger example
- Configuring Webpack
- npm install & script configuration
npm install -D webpack webpack-cli
- webpack.config.js
- npm install & script configuration
- ☐Have to refering each component js files and its reference files into html
- The original problem is not solved; but now we have a way
- ☐Writing html in javascript! Not feeling good.
- Have to refering each component js files and its reference files into html
- Writing html in javascript! Not feeling good.
- Better way to organise the files
- Improvements on code organisation
- Improvements on the navigation component
- Moving logic to ConnectedCallback
- introduced logic to show selection based on active attribute
- Creating elements instead of innerHtml
- Webcomponent for extending existing components
- Adding a library
- ☑ Violation of DRY principle
- Have to refering each component js files and its reference files into html
- Writing html in javascript! Not feeling good.
- Javascript Module bundler
- Hello world component
- Bottom components
- ☐ Violation of DRY principle
- Achieved partially but there are problems
- No way to set active status on a page level
- More into Webcomponents
- npm - for package management
- Install http-server npm package
npm install http-server
node_modules
folder &package-lock.json
file
- How to start the server?
- Initialize node project file
npm init -y
package.json
file
- Configure npm run command
npm run serve
- Initialize node project file
- Adding .gitignore to exclude node_modules
package.json
&package-lock.json
are required
- Violation DRY principle - https://en.wikipedia.org/wiki/Don%27t_repeat_yourself
- ☑ Introduce Webserver
- Webcomponents - https://developer.mozilla.org/en-US/docs/Web/Web_Components
This is a simple mobile web that contains three pages - Home, Gallery, Contact and Settings.
- There is an src folder that contains everything.
- Use Ratchet as the style library - http://goratchet.com/getting-started/
- Home and Gallery pages loads data from placeholder APIs
- Contact and Settings page do nothing specific
- Each pages has its own html and code behind javascript
- Unable to navigate to other pages by clicking the bottom link
- Serve in a webserver