Skip to content

Commit fb66900

Browse files
committed
update build.js & transpile tachyons-custom
1 parent c507525 commit fb66900

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

build.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@ const glob = require('glob')
55
const cssScss = require('css-scss')
66
const stream = require('stream')
77

8-
glob('./node_modules/tachyons/src/**/*.css', (err, files) => {
8+
glob('./node_modules/tachyons-custom/src/**/*.css', (err, files) => {
99
if (err) {
1010
throw err
1111
}
1212

1313
files.forEach(file => {
1414
var css = fs.readFileSync(file, 'utf8')
15-
var fileName = file.replace(/(\.\/node_modules\/tachyons\/src\/|\.css)/g, '')
15+
var fileName = file.replace(/(\.\/node_modules\/tachyons-custom\/src\/|\.css)/g, '')
1616

17-
if (fileName !== 'tachyons' && fileName !== '_media-queries' && fileName !== '_colors' && fileName !== '_debug') {
17+
if (fileName !== 'tachyons' && fileName !== '_debug' && fileName !== '_variables') {
1818
fs.writeFileSync('scss/' + fileName + '.scss', cssScss(css))
1919
}
2020
})
2121
})
2222

23-
const tachyonsCSS = fs.createReadStream('./node_modules/tachyons/src/tachyons.css')
23+
const tachyonsCSS = fs.createReadStream('./node_modules/tachyons-custom/src/tachyons.css')
2424
const tachyonsSCSS = fs.createWriteStream('./tachyons.scss')
2525
tachyonsCSS.on('data', (data) => {
2626
const sassStream = new stream.Readable()
2727
sassStream.push(
2828
data
2929
.toString('utf8')
3030
.replace(/\.\/_/g, 'scss/') // Update paths
31-
.replace(/^((.|\n)+)(\n\/\*\sModules(.|\n)+)(\n\/\*\sVariables(.|\n)+)/g, '$1$5$3') // Move import orders
31+
.replace(/^((.|\n)+)(\n \/\*\sModules(.|\n)+)(\n\/\*\sVariables(.|\n)+)/g, '$1$5$3') // Move import orders
3232
.replace(/\/\*(.*)\*\//g, '// $1') // Change single-line comments to //
3333
.replace(/\/\*|\s\*\/?/g, '//') // Change multi-line comments to //
3434
)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
],
2020
"license": "MIT",
2121
"dependencies": {
22-
"tachyons": "^4.9.0"
22+
"tachyons-custom": "^4.9.0"
2323
},
2424
"devDependencies": {
2525
"ava": "^0.22.0",

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3424,9 +3424,9 @@ table@^3.7.8:
34243424
slice-ansi "0.0.4"
34253425
string-width "^2.0.0"
34263426

3427-
tachyons@^4.9.0:
3427+
tachyons-custom@^4.9.0:
34283428
version "4.9.0"
3429-
resolved "https://registry.yarnpkg.com/tachyons/-/tachyons-4.9.0.tgz#2df058ea6b6eb3d2be12d62a69fecb0f6b1e0534"
3429+
resolved "https://registry.yarnpkg.com/tachyons-custom/-/tachyons-custom-4.9.0.tgz#68b998e8febed2850ba477245b351c26636d2c85"
34303430

34313431
tar-pack@^3.4.0:
34323432
version "3.4.0"

0 commit comments

Comments
 (0)