1
0
Fork 0
freesewing/config/scripts.yaml

98 lines
3 KiB
YAML
Raw Normal View History

_:
build: 'node build.mjs'
2020-08-08 17:20:08 +02:00
clean: 'rimraf dist'
mbuild: 'NO_MINIFY=1 node build.mjs'
2020-08-08 17:20:08 +02:00
symlink: 'mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -'
2022-09-15 13:49:55 +02:00
test: 'echo "{{name}}: No tests configured. Perhaps you could write some?" && exit 0'
vbuild: 'VERBOSE=1 node build.mjs'
2022-09-15 13:49:55 +02:00
lab: 'cd ../../sites/lab && yarn start'
tips: 'node ../../scripts/help.mjs'
2022-09-15 10:23:06 +02:00
lint: "npx eslint 'src/**' 'tests/*.mjs'"
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/*.mjs' 'tests/*.mjs'"
2022-07-15 12:02:07 +02:00
test: &test 'npx mocha tests/*.test.mjs'
2022-09-15 13:49:55 +02:00
testci: &testci 'npx mocha tests/*.test.mjs --reporter ../../tests/reporters/terse.js'
plugin:
prettier: "npx prettier --write 'src/*.mjs' 'tests/*.mjs'"
test: *test
testci: *testci
core:
report: 'c8 report'
test: 'c8 mocha tests/*.test.mjs'
2022-11-16 15:19:59 -06:00
testci: 'c8 mocha tests/*.test.mjs'
prettier: "npx prettier --write 'src/*.mjs' 'tests/*.mjs'"
lint: "npx eslint 'src/*.mjs' 'tests/*.mjs'"
2022-10-08 04:03:01 +02:00
jsdoc: 'jsdoc -c jsdoc.json -r src'
i18n:
prebuild: 'node scripts/prebuilder.mjs'
2022-08-28 19:51:15 +02:00
models:
2022-09-15 13:49:55 +02:00
test: 'npx mocha tests/*.test.mjs'
new-design:
2022-11-29 17:57:03 -06:00
i18n-only: 'SITE="new-design/shared" node ../../sites/shared/prebuild/i18n-only.mjs'
2022-10-08 04:03:01 +02:00
build: '!'
wbuild: '!'
lint: "npx eslint 'lib/*.mjs'"
mbuild: '!'
test: '!'
testci: '!'
vbuild: '!'
rehype-highlight-lines:
build: '!'
mbuild: '!'
vbuild: '!'
2022-11-16 15:19:59 -06:00
lint: "npx eslint 'src/*.mjs'"
rehype-jargon:
lint: "npx eslint 'src/*.mjs'"
snapseries:
lint: "npx eslint 'src/*.mjs'"
2022-12-17 16:48:36 +01:00
# Sites go here
backend:
2022-12-17 16:48:36 +01:00
dev: 'nodemon src/index.mjs'
initdb: 'npx prisma db push'
newdb: 'node ./scripts/newdb.mjs'
prettier: "npx prettier --write 'src/*.mjs' 'tests/*.mjs'"
rmdb: 'node ./scripts/rmdb.mjs'
test: 'npx mocha --require mocha-steps tests/index.mjs'
dev:
build: &nextBuild 'node --experimental-json-modules ../../node_modules/next/dist/bin/next build'
cibuild: 'yarn build && node scripts/algolia.mjs'
dev: &nextDev 'node --experimental-json-modules ../../node_modules/next/dist/bin/next dev -p 8000'
develop: *nextDev
lint: &nextLint '../../node_modules/next/dist/bin/next lint'
prebuild: 'SITE=dev node --experimental-json-modules ../shared/prebuild/index.mjs'
serve: "pm2 start npm --name 'dev' -- run start"
start: &nextStart 'yarn prebuild && yarn dev'
email:
build: 'maizzle build production'
dev: 'maizzle serve'
lab:
build: *nextBuild
cibuild: 'yarn build'
clean: 'rimraf pages/*.mjs && rimraf pages/*/*.mjs && rimraf pages/v/*/*.mjs'
dev: *nextDev
develop: *nextDev
lint: *nextLint
prebuild: 'SITE=lab node --experimental-json-modules ../shared/prebuild/index.mjs'
start: *nextStart
org:
build: *nextBuild
cibuild: 'yarn build'
clean: 'rimraf pages/*.mjs && rimraf pages/*/*.mjs && rimraf pages/v/*/*.mjs'
dev: *nextDev
develop: *nextDev
i18n: 'SITE=org node ../shared/prebuild/i18n-only.mjs'
lint: *nextLint
prebuild: 'SITE=org node --experimental-json-modules ../shared/prebuild/index.mjs'
start: *nextStart
sanity:
start: 'sanity start'
test: 'sanity check'
build: 'sanity build -y'