1
0
Fork 0
freesewing/config/scripts.yaml

50 lines
2.8 KiB
YAML
Raw Normal View History

_:
build: 'node build.js'
2020-08-08 17:20:08 +02:00
clean: 'rimraf dist'
mbuild: 'NO_MINIFY=1 node build.js'
2020-08-08 17:20:08 +02:00
symlink: 'mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -'
test: &notests 'echo "{{name}}: No tests configured. Perhaps you''d like to do this?" && exit 0'
vbuild: 'VERBOSE=1 node build.js'
2022-06-17 14:12:46 +02:00
lab: "cd ../../sites/lab && yarn start"
2019-05-31 16:33:01 +02:00
_types:
chore: Re-structure workspaces, enforce build order These are some changes in the way the monorepo is structured, that are aimed at making it easier to get started. There are two important changes: **Multiple workspaces** We had a yarn workspaces setup at `packages/*`. But our monorepo has grown to 92 packages which can be overwhelming for people not familiar with the package names. To remedy this, I've split it into 4 different workspaces: - `designs/*`: Holds FreeSewing designs (think patterns) - `plugins/*`: Holds FreeSewing plugins - `packages/*`: Holds other packages published on NPM - `sites/*`: Holds software that is not published as an NPM package, such as our various websites and backend API This should make it easier to find things, and to answer questions like *where do I find the code for the plugins*. **Updated reconfigure script to handle build order** One problem when bootstrapping the repo is inter-dependencies between packages. For example, building a pattern will only work once `plugin-bundle` is built. Which will only work once all plugins in the bundle or built. And that will only work when `core` is built, and so on. This can be frustrating for new users as `yarn buildall` will fail. And it gets overlooked by seasoned devs because they're likely to have every package built in their repo so this issue doesn't concern them. To remedy this, we now have a `config/build-order.mjs` file and the updated `/scripts/reconfigure.mjs` script will enforce the build order so that things *just work*.
2022-06-16 17:11:31 +02:00
design:
prettier: "npx prettier --write 'src/*.js' 'config/*.js'"
2022-02-19 10:07:43 +01:00
test: &test 'BABEL_ENV=production npx mocha tests/*.test.mjs --require @babel/register'
testci: &testci "BABEL_ENV=production npx mocha tests/*.test.mjs --require @babel/register --reporter ../../tests/reporters/terse.js"
plugin:
prettier: "npx prettier --write 'src/*.js' 'tests/*.mjs'"
test: *test
testci: *testci
create-freesewing-pattern:
build: '!'
cibuild_step1: '!'
2020-08-08 17:20:08 +02:00
clean: '!'
mbuild: '!'
test: '!'
testci: '!'
vbuild: '!'
css-theme:
2020-08-08 17:20:08 +02:00
build: 'npx node-sass --output-style compressed src/theme.scss dist/theme.css'
watch: 'npx node-sass --watch --output-style compressed src/theme.scss dist/theme.css'
components:
clean: 'rimraf Blockquote && rimraf Draft && rimraf DraftConfigurator && rimraf Emblem && rimraf Example && rimraf Footer && rimraf Icon && rimraf Legend && rimraf LineDrawing && rimraf Logo && rimraf Navbar && rimraf Ogol && rimraf Robot && rimraf SampleConfigurator && rimraf Spinner && rimraf withGist && rimraf withLanguage && rimraf withStorage && rimraf Workbench'
2020-08-08 17:20:08 +02:00
storybook: 'start-storybook -p 6663'
test: *notests
core:
coverage: 'BABEL_ENV=production nyc npm test && nyc report --reporter=text-lcov > coverage.lcov && ./node_modules/.bin/codecov'
report: 'BABEL_ENV=production nyc report --reporter=html'
2022-02-19 10:07:43 +01:00
test: 'BABEL_ENV=production nyc -x node_modules -x tests/fixtures -x bin-pack npx mocha tests/*.test.js'
testci: "BABEL_ENV=production npx mocha tests/*.test.js --require @babel/register --reporter ../../tests/reporters/terse.js"
testonly: 'BABEL_ENV=production npx mocha tests/*.test.js'
i18n:
# react-scripts doesn't handle .mjs files correctly
prebuild: 'node src/prebuild.mjs'
test: *test
testci: *testci
pattern-info:
cibuild_step1: '!'
chore: Re-structure workspaces, enforce build order These are some changes in the way the monorepo is structured, that are aimed at making it easier to get started. There are two important changes: **Multiple workspaces** We had a yarn workspaces setup at `packages/*`. But our monorepo has grown to 92 packages which can be overwhelming for people not familiar with the package names. To remedy this, I've split it into 4 different workspaces: - `designs/*`: Holds FreeSewing designs (think patterns) - `plugins/*`: Holds FreeSewing plugins - `packages/*`: Holds other packages published on NPM - `sites/*`: Holds software that is not published as an NPM package, such as our various websites and backend API This should make it easier to find things, and to answer questions like *where do I find the code for the plugins*. **Updated reconfigure script to handle build order** One problem when bootstrapping the repo is inter-dependencies between packages. For example, building a pattern will only work once `plugin-bundle` is built. Which will only work once all plugins in the bundle or built. And that will only work when `core` is built, and so on. This can be frustrating for new users as `yarn buildall` will fail. And it gets overlooked by seasoned devs because they're likely to have every package built in their repo so this issue doesn't concern them. To remedy this, we now have a `config/build-order.mjs` file and the updated `/scripts/reconfigure.mjs` script will enforce the build order so that things *just work*.
2022-06-16 17:11:31 +02:00
build: 'node src/prebuild.js && node build.js'
2020-08-08 17:20:08 +02:00
prebuild: 'node src/prebuild.js'
utils:
clean: "rimraf backend && rimraf camelCase && rimraf capitalize && rimraf cloneObject && rimraf convertSize && rimraf defaultGist && rimraf defaultSa && rimraf formatImperial && rimraf formatMm && rimraf isDegMeasurement && rimraf measurementAsMm && rimraf measurementDiffers && rimraf neckstimate && rimraf optionDefault && rimraf optionType && rimraf roundMm && rimraf roundMmDown && rimraf roundMmUp && rimraf sliderStep && rimraf smallestImperialStep && rimraf storage && rimraf tiler && rimraf validateEmail && rimraf validateTld"