Fix build scripts

This commit is contained in:
yuanchuan 2022-01-28 22:46:27 +08:00
parent 5bbb6f91a3
commit 7d077657a6
3 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ build: $(LIB)
minify: $(TARGET)
@npm run minify
@./tools/trim $(TARGET_MIN)
@./tools/trim.js $(TARGET_MIN)
test:
@npm run test

View File

@ -6,7 +6,7 @@
"scripts": {
"build": "rollup -c rollup.config.js",
"minify": "terser -cm --comments '/^!/' -o css-doodle.min.js --ecma 6 -b ascii_only=true -- css-doodle.js",
"trim": "./tools/trim css-doodle.min.js",
"trim": "./tools/trim.js css-doodle.min.js",
"test": "ava",
"test:watch": "npm test -- --watch"
},

View File

@ -1,7 +1,7 @@
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
import fs from 'fs';
import path from 'path';
const target = process.argv[2];
if (!target) {