1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-16 20:24:01 +02:00

add prod and dev examples

This commit is contained in:
Ian Storm Taylor
2016-07-29 12:44:35 -07:00
parent ecc9202db7
commit 99d1c283f0
4 changed files with 24 additions and 7 deletions

4
.gitignore vendored
View File

@@ -1,6 +1,6 @@
*.sketch
build.js
build.js.map
dist
examples/build.dev.js
examples/build.prod.js
node_modules
tmp

13
examples/dev.html Normal file
View File

@@ -0,0 +1,13 @@
<html>
<head>
<meta charset="utf-8" />
<title>Slate</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,400i,700,700i&subset=latin-ext" >
<link rel="stylesheet" href="index.css">
</head>
<body>
<main></main>
<script src="build.dev.js"></script>
</body>
</html>

View File

@@ -8,6 +8,6 @@
</head>
<body>
<main></main>
<script src="build.js"></script>
<script src="build.prod.js"></script>
</body>
</html>

View File

@@ -74,12 +74,16 @@
"dist:bundle:min": "NODE_ENV=production browserify ./dist/index.js --transform envify --transform uglifyify --transform browserify-shim --standalone Slate | uglifyjs --output ./dist/slate.min.js",
"dist:npm": "babel --out-dir ./dist ./lib",
"dist:watch": "babel --watch --out-dir ./dist ./lib",
"examples": "browserify --debug --transform babelify ./examples/index.js --outfile ./examples/build.js",
"examples:watch": "watchify --debug --transform babelify ./examples/index.js --outfile ./examples/build.js",
"gh-pages": "gh-pages --dist ./examples",
"examples": "npm run examples:dev && npm run examples:prod",
"examples:dev": "browserify --debug --transform babelify ./examples/index.js --outfile ./examples/build.dev.js",
"examples:open": "open http://localhost:8080/dev.html",
"examples:prod": "NODE_ENV=production browserify --transform babelify ./examples/index.js --outfile ./examples/build.prod.js",
"examples:start": "http-server ./examples",
"examples:watch": "watchify --debug --transform babelify ./examples/index.js --outfile ./examples/build.dev.js",
"gh-pages": "npm run dist && npm run examples && gh-pages --dist ./examples",
"lint": "eslint --ignore-pattern 'build.js' '{examples,lib}/**/*.js'",
"prepublish": "npm run dist",
"start": "http-server ./examples",
"start": "npm run examples:start",
"test": "npm run dist && npm run lint && npm run test:server",
"test:server": "mocha --compilers js:babel-core/register --reporter spec ./test/server.js"
},