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
const fs = require('fs') | |
const path = require('path') | |
const dedent = require('dedent') | |
const { run } = require('runjs') | |
function createComponent(filePath) { | |
const dirName = path.basename(filePath) | |
const componentName = dirName.toUpperCase() | |
const content = dedent` |
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
{ | |
"scripts": { | |
"build_closure_core": "node ./tools/make-closure-core.js", | |
"build_global": "npm-run-all clean_dist_global build_esm5_for_rollup && mkdirp ./dist/global && node ./tools/make-umd-bundle.js && npm-run-all build_closure_core clean_dist_esm5_for_rollup", | |
"build_perf": "webdriver-manager update && npm-run-all build_cjs build_global perf", | |
"decision_tree_widget": "cd doc/decision-tree-widget && npm run build && cd ../..", | |
"generate_packages": "node .make-packages.js", | |
"perf_micro": "node ./perf/micro/index.js", | |
"tests2png": "tsc && mkdirp tmp/docs/img && mkdirp spec-js/support && shx cp spec/support/*.opts spec-js/support/ && mocha --opts spec/support/tests2png.opts spec-js", | |
} |
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
{ | |
"preinstall": "node tools/nodeVersionCheck.js", | |
"setup": "node tools/setup/setupMessage.js && npm install && node tools/setup/setup.js", | |
"remove-demo": "babel-node tools/removeDemo.js", | |
"start-message": "babel-node tools/startMessage.js", | |
"open:src": "babel-node tools/srcServer.js", | |
"open:dist": "babel-node tools/distServer.js", | |
"analyze-bundle": "babel-node ./tools/analyzeBundle.js" | |
} |
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
export * from 'shared-tasks' | |
export function local () { | |
} |
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
import { help } from 'runjs' | |
export function build () { | |
} | |
help(build, 'Generates JS bundle') |
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
{ | |
"name": "react-component", | |
"version": "1.0.0", | |
"main": "lib/index.js", | |
"scripts": { | |
"build": "babel src --out-dir lib --ignore test.js", | |
"lint": "eslint src", | |
"test": "npm run lint && npm run build && jest --env=jsdom", | |
"clean": "rm -rf node_modules" | |
}, |
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
import { run } from 'runjs' | |
function log () { | |
} | |
export function start () { | |
run('http-server .', {async: true}).then((output) => { | |
log(output) | |
}).catch((error) => { |
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
import { run } from 'runjs' | |
export function clean () { | |
} | |
export function build () { | |
process.on('SIGINT', clean) | |
try { | |
} catch (e) { |
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
import { run } from 'runjs' | |
export function test (what, mode = 'node') { | |
if (mode == 'browser') { | |
} else { | |
} | |
} |
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
import { run, option } from 'runjs' | |
export function clean () { | |
run('rm -rf node_modules') | |
run('rm -rf build') | |
} | |
export function lint (path = '.') { | |
option(this, 'fix') ? run(`eslint ${path} --fix`) : run(`eslint ${path}`) | |
} |
NewerOlder