WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ The `au new` command now simplify wraps `npx makes aurelia/v1`. Users can direct

Run `npm test` to run the unit tests.

To run and individual test, you can use command with filters. For example:

```powershell
npx jasmine spec/lib/build/bundled-source.spec.js --filter="transform saves cache"
```

## Release new aurelia-cli version

Just run `npm version patch` (or minor or major)
Expand Down
11 changes: 8 additions & 3 deletions bin/aurelia-cli.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
#!/usr/bin/env node

/**
* @import { CLI } from '../dist/cli'
*/

const resolve = require('resolve');

const semver = require('semver');
const nodeVersion = process.versions.node;
if (semver.lt(nodeVersion, '10.12.0')) {
if (semver.lt(nodeVersion, '14.17.0')) {
console.error(`You are running Node.js v${nodeVersion}.
aurelia-cli requires Node.js v10.12.0 or above.
aurelia-cli requires Node.js v14.17.0 or above.
Please upgrade to latest Node.js https://nodejs.org`);
process.exit(1);
}
Expand All @@ -22,10 +26,11 @@ let originalBaseDir = process.cwd();
resolve('aurelia-cli', {
basedir: originalBaseDir
}, function(error, projectLocalCli) {
/** @type {CLI} */
let cli;

if (commandName === 'new' || error) {
cli = new (require('../lib/index').CLI);
cli = new (require('../dist/index').CLI);
cli.options.runningGlobally = true;
} else {
cli = new (require(projectLocalCli).CLI);
Expand Down
4 changes: 4 additions & 0 deletions build/clean-dir.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { rmSync, mkdirSync } from 'node:fs';

rmSync('./dist', { recursive: true, force: true});
mkdirSync('./dist');
6 changes: 6 additions & 0 deletions build/copy-files.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import * as cpx from 'cpx';

cpx.copy('src/**/*.json', 'dist')
.on('copy', (e) => console.log(`Copied: ${e.srcPath}`));
cpx.copy('src/**/*.txt', 'dist')
.on('copy', (e) => console.log(`Copied: ${e.srcPath}`));
61 changes: 36 additions & 25 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,35 +1,46 @@
import globals from "globals";
import eslint from "@eslint/js";
// @ts-check

export default [
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import stylistic from '@stylistic/eslint-plugin';

export default tseslint.config(
{
ignores: ["lib/build/amodro-trace", "**/dist"],
ignores: ['src/build/amodro-trace', '**/dist', '**/lib', './spec', './build', './bin']
},
eslint.configs.recommended,
tseslint.configs.recommended,
{
languageOptions: {
globals: {
...globals.node,
...globals.jasmine,
},

ecmaVersion: 2019,
sourceType: "commonjs",
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname
}
},

plugins: {
'@stylistic': stylistic
}
},
{
rules: {
"no-prototype-builtins": 0,
"no-console": 0,
"getter-return": 0,
"no-inner-declarations": 0,

"comma-dangle": ["error", {
arrays: "never",
objects: "never",
imports: "never",
exports: "never",
functions: "never",
'no-prototype-builtins': 0,
'no-console': 0,
'getter-return': 0,
'no-inner-declarations': 0,
'comma-dangle': ['error', {
arrays: 'never',
objects: 'never',
imports: 'never',
exports: 'never',
functions: 'never'
}],
},
'prefer-rest-params': 'warn',
'prefer-spread': 'warn',
'@stylistic/quotes': ['warn', 'single'],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-require-imports': 'warn',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': 'error'
}
}
];
);
11 changes: 11 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./",
"allowJs": true,
"types": ["node"],
"module": "nodenext",
"moduleResolution": "nodenext",
},
"include": ["bin", "build", "eslint.config.mjs"]
}
231 changes: 0 additions & 231 deletions lib/build/amodro-trace/lib/lang.js

This file was deleted.

Loading