Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
55 lines (41 sloc) 1.4 KB
var env :dev
if (is process.env.env :release)
= env :release
stir $ require :stir-template
fs $ require :fs
({}~ html head title meta link script body div style textarea) stir
logoUrl :
cdnUrl $ cond (is process.env.local :true) : :
console.log ":Running mode" (or process.env.env :dev)
var assets
case env
= assets $ {}
:main $ + :http://localhost :: 8080 :/main.js
:style null
var assetsJson $ require :./dist/assets
console.log ":Using CDN url:" (JSON.stringify cdnUrl)
= assets $ {}
:main $ + cdnUrl assetsJson.main.js
:style null
console.log ":Assets" assets
var html
stir.render stir.doctype
html null
head null
title null :Workflow
meta $ {} :charset :utf-8
link $ {} :rel :icon :href logoUrl
cond (?
link $ {} :rel :stylesheet :href
script $ {} :src assets.main :defer true
style null ":body * {box-sizing: border-box;}"
body ({} :style ":margin: 0;")
div ({} :id :app)
textarea $ {} (:class ":demo source") (:placeholder ":Source Code")
textarea $ {} (:class ":demo target") (:placeholder ":Compiled Code")
fs.writeFileSync (cond (is process.env.env :release) :dist/index.html :index.html) html
console.log ":Write index.html"
You can’t perform that action at this time.