create-clarity 1.0.1 → 1.1.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.
@@ -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.1', gl: '^1.0.0', audio: '^1.0.0' }; // 1.0.1: the first with the skill AGENTS.md points into
29
+ const VERSIONS = { clarity: '^1.1.0', gl: '^1.0.0', audio: '^1.0.0' }; // 1.1.0: 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
@@ -23,6 +23,7 @@ function gameFiles(opts) {
23
23
  build: 'vite build',
24
24
  preview: 'vite preview',
25
25
  test: 'node --test',
26
+ lint: 'clarity lint .',
26
27
  balance: 'clarity balance src/rules.js --seeds 24 --seconds 150',
27
28
  },
28
29
  dependencies: {
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. **Compile before you say it is done:** \`npx clarity check path/File.clarity\` for every file
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-clarity",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Scaffold a new Clarity.js app — npm create clarity@latest",
5
5
  "type": "commonjs",
6
6
  "bin": {