forked from BloomBooks/BloomDesktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
68 lines (68 loc) · 4.87 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
"scripts": {
"build": "npm-run-all build:pug build:less build:branding:files build:templates:files build:templates:typescript build:appearance build:appearanceMigrations",
"watch": "npm-run-all watch:pug watch:less watch:branding:files",
"//1": "TODO: currently we haven't figured this out without gulp, so we're just building *all* pugs in this directory along with BloomBrowserUI/",
"//2": "See https://github.com/Qard/onchange/issues/118",
"//3": "The key to navigating these issues it to realize that the problem doesn't exist outside windows. Elsewhere, the terminal expands globs.",
"build:pug": "cd ../BloomBrowserUI && npm run-script build:pug",
"//NB we don't have a version of pug that handles globs, so we wrap with onchange": "",
"//Notice that onchange can steer files to the right folder, which isn't doable with the command with built-in glob handling": "",
"The -j option is how many jobs to do in parallel": "",
"The -a option says to run them all before watching": "",
"watch:pug": "onchange -j 9 -a \"**/*.pug\" -- pug {{file}} --pretty --out ../../output/browser/{{fileDir}}",
"//": "______________________________________________________________________________________________________",
"build:pageSizes": "yarn ts-node pageSizes.ts",
"build:less": "npm-run-all build:pageSizes build:less-inner",
"build:less-inner": "npm-run-all --parallel build:branding:less build:templates:less build:layout:less",
"// there is no current way to exclude node_modules, so we can't just do the whole directory.": "https://github.com/jonycheung/deadsimple-less-watch-compiler/issues/72",
"watch:less": "npm-run-all --parallel watch:branding:less watch:templates:less watch:layout:less",
"build:templates:files": "cpx \"templates/**/!(tsconfig).{png,jpg,svg,css,json,htm,html,txt,js}\" \"../../output/browser/templates\" -v",
"build:templates:typescript": "cd \"templates/template books/Activity\" && npx tsc && echo \"typescript build done\"",
"build:branding:files": "cpx \"branding/**/!(source)/*.{png,jpg,svg,css,json,htm}\" ../../output/browser/branding -v",
"build:branding:less": "less-watch-compiler --source-map --run-once branding ../../output/browser/branding",
"build:templates:less": "less-watch-compiler --source-map --run-once templates ../../output/browser/templates",
"build:layout:less": "less-watch-compiler --source-map --run-once bookLayout ../../output/browser/bookLayout",
"build:appearance": "yarn rimraf ../../output/browser/appearanceThemes && cpx \"appearanceThemes/**/*.css\" ../../output/browser/appearanceThemes -v",
"watch:appearance": "cpx \"appearanceThemes/**/*.css\" ../../output/browser/appearanceThemes --watch -v",
"watch:branding:files": "cpx \"branding/**/!(source)/*.{png,jpg,svg,css,json,htm,html,txt,js}\" ../../output/browser/branding --watch -v",
"build:appearanceMigrations": "cpx \"appearanceMigrations/**\" ../../output/browser/appearanceMigrations -v",
"watch:appearanceMigrations": "cpx \"appearanceMigrations/**\" ../../output/browser/appearanceMigrations --watch -v",
"watch:branding:less": "less-watch-compiler --source-map branding ../../output/browser/branding",
"watch:templates:less": "less-watch-compiler --source-map templates ../../output/browser/templates",
"watch:layout:less": "less-watch-compiler --source-map bookLayout ../../output/browser/bookLayout",
"///": "______________________________________________________________________________________________________",
"//This is slow compared to less-watch-compiler: watch:less": "onchange -a \"**/*.less\" -- lessc {{file}} ../../output/browser/{{fileDir}}",
"//Note that this is really slow compared to cpx with the glob (buildBrandingFiles/watchBrandingFiles)": "//",
"//too slow: watch:files": "onchange -a \"branding/**/!(source)/*.{png,jpg,svg,css,json,htm}\" -- cpx {{file}} ../../output/browser/{{fileDir}} -v"
},
"//devDependencies": {
"less": "We are using 3.x because 4.0 changed the rules for division handling and did not provide migration instructions. See the `math` option."
},
"devDependencies": {
"cpx": "^1.5.0",
"less": "3.13.1",
"less-watch-compiler": "^1.13.0",
"lessc-glob": "^1.0.9",
"npm-run-all": "^4.1.5",
"onchange": "^7.1.0",
"prettier": "^3.0.3",
"pug": "^3.0.2",
"pug-cli": "^1.0.0-alpha6",
"rimraf": "^5.0.5",
"ts-node": "^10.9.1"
},
"license": "MIT",
"dependencies": {
"@types/node": "^18.6.3",
"typescript": "^4.6.3"
},
"packageManager": "yarn@1.22.19",
"lint-staged": {
"*": "prettier --write"
},
"volta": {
"node": "16.14.0",
"yarn": "1.22.19"
}
}