forked from ueno-llc/newsletter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage-scripts.yml
27 lines (27 loc) · 1.12 KB
/
package-scripts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
scripts:
# Runs the build process in watch mode. Run with `npm start`
default: nps clean watch
# Runs the build process for uploading to Mailchimp. Run with `npm run build`
build:
default: NODE_ENV=production nps build.pre clean sass assets emails.inline build.post
pre: rimraf dist
post: opn dist
# Watch templates, static assets, and Sass files for changes and re-compile
watch: concurrently "nps emails.watch" "nps assets.watch" "nps sass.watch" "nps server"
# Transform Inky HTML templates into standard HTML
emails:
default: panini src build && inky "build/*.html" build
watch: onchange "src/**/*.{hbs,yml,js}" -i -- nps emails
inline: nps emails && scow "build/**/*.html" dist --compress
# Copy static assets
assets:
default: cpy "**/*.*" "../../build" --cwd=src/assets --parents
watch: onchange "src/assets/**/*" -i -- nps assets
# Compile Sass to CSS
sass:
default: node-sass --include-path=. -o=build src/styles
watch: nps sass && nps "sass --watch"
# Empty build folder
clean: rimraf build && mkdir build
# Run live-reloading server
server: lite-server -c bs-config.js