https://github.com/stealjs/steal-conditional-boolean-example
Demo of the steal-conditional boolean syntax
https://github.com/stealjs/steal-conditional-boolean-example
Last synced: 2 months ago
JSON representation
Demo of the steal-conditional boolean syntax
- Host: GitHub
- URL: https://github.com/stealjs/steal-conditional-boolean-example
- Owner: stealjs
- License: mit
- Created: 2017-01-23T14:49:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-20T16:42:43.000Z (almost 6 years ago)
- Last Synced: 2025-01-21T03:43:15.659Z (4 months ago)
- Language: JavaScript
- Homepage: https://stealjs.com/docs/steal-conditional.html#boolean-conditionals
- Size: 4.88 KB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# steal-conditional boolean syntax demo
Example app using steal-conditional's [boolean syntax](http://stealjs.com/docs/StealJS.guides.boolean_conditional_loading.html) to load the [JavaScript Internationalization API polyfill](https://github.com/andyearnshaw/Intl.js/) only for browsers that need it.
The file structure of this demo looks like this:
```
├── app.js
├── index.html
├── index.js
├── package.json
└── requires-polyfill.js
````index.js` is the main module and it uses the `steal-conditional` syntax to load the Intl polyfill; `requires-polyfill.js` is the condition module used to determine _whether_ the polyfill should be loaded or not when the app is executed in the browser.
In order to run the demo in your browser follow the steps below:
1. Clone this repo
2. Run `npm install`
3. Run `npm start`
4. Open `index.html` in your browser
# Building the application
1. Run `npm build`
2. Edit `index.html` to load `steal.production.js`
3. Open `index.html` in your browser