To use this app, first install:
npm install
And then build:
npm run build
package-lock.json | |
node_modules/ | |
dist/ |
var stealTools = require('steal-tools'); | |
stealTools.build({ | |
main: ['app/home', 'app/login'] | |
}); |
<!doctype html> | |
<html lang="en"> | |
<title>Home page</title> | |
<main></main> | |
<script src="./dist/steal.production.js" main="app/home"></script> |
let main = document.querySelector('main'); | |
main.innerHTML = ` | |
<h1>Home page</h1> | |
`; |
<!doctype html> | |
<html lang="en"> | |
<title>Login</title> | |
<main></main> | |
<script src="./dist/steal.production.js" main="app/login"></script> |
let main = document.querySelector('main'); | |
main.innerHTML = ` | |
<h1>Login</h1> | |
`; |
{ | |
"name": "app", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"build": "node build.js", | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"keywords": [], | |
"author": "", | |
"license": "ISC", | |
"devDependencies": { | |
"steal": "^1.6.0", | |
"steal-tools": "^1.9.2" | |
} | |
} |