Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update deps and refactor a little
- Loading branch information
1 parent
8093f74
commit 0e20943
Showing
12 changed files
with
159 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
var z = require('zunder') | ||
var u = z.undertaker | ||
var setZunderConfig = require('./set-zunder-config') | ||
const z = require('zunder') | ||
const u = z.undertaker | ||
const setZunderConfig = require('./set-zunder-config') | ||
const copyScss = require('./copy-scss') | ||
|
||
setZunderConfig(z) | ||
|
||
u.series( | ||
z.applyDevEnv, | ||
z.cleanDev, | ||
u.parallel( | ||
z.copyDevScripts, | ||
z.buildDevStylesheets | ||
) | ||
z.copyDevScripts, | ||
z.buildDevStylesheets, | ||
copyScss(z.config.devDir) | ||
)() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,14 @@ | ||
var fs = require('fs') | ||
var path = require('path') | ||
var z = require('zunder') | ||
var u = z.undertaker | ||
var setZunderConfig = require('./set-zunder-config') | ||
const z = require('zunder') | ||
const u = z.undertaker | ||
const setZunderConfig = require('./set-zunder-config') | ||
const copyScss = require('./copy-scss') | ||
|
||
setZunderConfig(z) | ||
|
||
var copyScss = () => { | ||
var from = path.join(__dirname, '..', 'src', 'main.scss') | ||
var to = path.join(z.config.prodDir, 'tooltip.scss') | ||
|
||
return fs.createReadStream(from) | ||
.pipe(fs.createWriteStream(to)) | ||
} | ||
|
||
u.series( | ||
z.applyProdEnv, | ||
z.cleanProd, | ||
z.copyProdScripts, | ||
z.buildProdStylesheets, | ||
copyScss | ||
copyScss(z.config.prodDir) | ||
)() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const fs = require('fs') | ||
const path = require('path') | ||
|
||
module.exports = (dir) => () => { | ||
const from = path.join(__dirname, '..', 'src', 'main.scss') | ||
const to = path.join(dir, 'tooltip.scss') | ||
|
||
return fs.createReadStream(from) | ||
.pipe(fs.createWriteStream(to)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,27 @@ | ||
var z = require('zunder') | ||
var u = z.undertaker | ||
var setZunderConfig = require('./set-zunder-config') | ||
const fs = require('fs-extra') | ||
const z = require('zunder') | ||
const u = z.undertaker | ||
const setZunderConfig = require('./set-zunder-config') | ||
const copyScss = require('./copy-scss') | ||
|
||
const ensureDevDir = () => fs.ensureDir(z.config.devDir) | ||
|
||
setZunderConfig(z) | ||
|
||
// TODO: watch scss, so it's copied on change | ||
|
||
u.series( | ||
z.applyDevEnv, | ||
z.cleanDev, | ||
ensureDevDir, | ||
copyScss(z.config.devDir), | ||
u.parallel( | ||
z.watchServer, | ||
z.watchStaticAssets, | ||
// need these for 'design' mode, but z.watchScripts conflicts with z.watchTests | ||
// because testDir and devDir are the same. need to fix in zunder | ||
// z.watchServer, | ||
// z.watchStaticAssets, | ||
// z.watchScripts, | ||
z.watchTests, | ||
z.watchScripts, | ||
z.watchStylesheets | ||
) | ||
)() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.