create-clarity 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/create-clarity.js +1 -1
- package/lib/game.js +1 -0
- package/lib/templates.js +5 -2
- package/package.json +1 -1
package/bin/create-clarity.js
CHANGED
|
@@ -26,7 +26,7 @@ const { scaffold, isNonEmptyDir } = require('../lib/scaffold');
|
|
|
26
26
|
const c = prompts.colors;
|
|
27
27
|
const PKG_VERSION = require('../package.json').version;
|
|
28
28
|
// the versions a new project asks for (bumped with each release of the framework)
|
|
29
|
-
const VERSIONS = { clarity: '^1.0
|
|
29
|
+
const VERSIONS = { clarity: '^1.2.0', gl: '^1.0.0', audio: '^1.0.0' }; // (1.1.0 was the first whose `clarity lint` and `clarity check` read a file as the compiler does)
|
|
30
30
|
|
|
31
31
|
function parseArgs(argv) {
|
|
32
32
|
const args = { _: [], flags: {} };
|
package/lib/game.js
CHANGED
package/lib/templates.js
CHANGED
|
@@ -51,6 +51,8 @@ function buildFiles(opts) {
|
|
|
51
51
|
devDeps.jsdom = '^26.0.0';
|
|
52
52
|
}
|
|
53
53
|
if (opts.typescript) scripts.typecheck = 'tsc --noEmit';
|
|
54
|
+
// the compiler's errors and the linter's findings for every .clarity file (node_modules and dist are left alone)
|
|
55
|
+
scripts.lint = 'clarity lint .';
|
|
54
56
|
|
|
55
57
|
files['package.json'] = JSON.stringify({
|
|
56
58
|
name: opts.projectName,
|
|
@@ -508,8 +510,9 @@ data, server rendering, forms, tests) and \`references/porting.md\` (from React,
|
|
|
508
510
|
Two rules:
|
|
509
511
|
|
|
510
512
|
1. **Do not invent syntax.** If it is not in \`references/language.md\`, it does not exist.
|
|
511
|
-
2. **
|
|
512
|
-
you wrote or changed.
|
|
513
|
+
2. **Check before you say it is done:** \`npx clarity check path/File.clarity\` for every file
|
|
514
|
+
you wrote or changed. It compiles the file and lints it: an error means it is not done, and a
|
|
515
|
+
warning names something that is almost surely a mistake (\`npm run lint\` does the whole project).
|
|
513
516
|
|
|
514
517
|
## This project
|
|
515
518
|
|