Skip to content

Commit

Permalink
Create missing folders of installation target (#12)
Browse files Browse the repository at this point in the history
- Close #11, Create missing folder of installation target with
`--recursive` option
- Update Node.js dependency to at least v18.16
  • Loading branch information
sophiebremer authored Mar 16, 2024
1 parent 1addadd commit d4ca2ff
Show file tree
Hide file tree
Showing 17 changed files with 257 additions and 87 deletions.
2 changes: 1 addition & 1 deletion bin/install-amd.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

import Installer from './installer.js';
import Installer from '../lib/installer.js';

Installer
.run( process.argv.slice( 1 ) )
Expand Down
1 change: 0 additions & 1 deletion bin/installer.js.map

This file was deleted.

6 changes: 3 additions & 3 deletions lib/amd.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
Copyright (c) TypeScriptLibs and Contributors
Licensed under the MIT License; you may not use this file except in
compliance with the License. You may obtain a copy of the MIT License at
https://typescriptlibs.org/LICENSE.txt
Licensed under the MIT License.
You may not use this file except in compliance with the License.
You can get a copy of the License at https://typescriptlibs.org/LICENSE.txt
\*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*/
interface AMDModule extends Record<string, any> {
Expand Down
6 changes: 3 additions & 3 deletions lib/amd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions lib/installer.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*\
TypeScript AMD Loader
Copyright (c) TypeScriptLibs and Contributors
Licensed under the MIT License.
You may not use this file except in compliance with the License.
You can get a copy of the License at https://typescriptlibs.org/LICENSE.txt
\*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*/
export declare class Installer {
constructor(argv: Array<string>);
readonly argv: Array<string>;
readonly target: string;
run(): Promise<void>;
}
export declare namespace Installer {
interface Args extends Partial<Record<string, (boolean | string)>> {
help?: boolean;
recursive?: boolean;
source?: string;
verbose?: boolean;
version?: boolean;
}
const CWD: string;
const DIR: string;
const VERSION = "Version 1.1.0";
const HELP: string[];
function run(argv: Array<string>): Promise<void>;
}
export default Installer;
33 changes: 22 additions & 11 deletions bin/installer.js → lib/installer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/installer.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
"install-amd": "bin/install-amd.mjs"
},
"devDependencies": {
"@typescriptlibs/tst": "^0.0.5",
"@types/node": "18.16.0",
"@typescriptlibs/tst": "^0.1.0",
"uglify-js": "^3.17.4",
"typescript": "~5.0.4"
"typescript": "~5.4.2"
},
"engines": {
"node": ">=16.8.0"
"node": ">=18.16.0"
},
"files": [
"bin/",
Expand All @@ -35,8 +36,8 @@
],
"scripts": {
"build": "npm run clean && npm run build:amd && npm run build:installer",
"build:amd": "tsc -p src/tsconfig.json && uglifyjs -cmo lib/amd.js --comments /^!/ --source-map url=amd.js.map -- lib/amd.js",
"build:installer": "tsc -p src/tsconfig-installer.json",
"build:amd": "tsc -p src/ && uglifyjs -cmo lib/amd.js --comments /^!/ --source-map url=amd.js.map -- lib/amd.js",
"build:installer": "tsc -p src/installer/",
"clean": "rm -rf bin/installer.* lib/ tst-run/",
"test": "npm run build && tst --reset --verbose tst/",
"watch": "npm run build -- --watch"
Expand Down
6 changes: 3 additions & 3 deletions src/amd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
Copyright (c) TypeScriptLibs and Contributors
Licensed under the MIT License; you may not use this file except in
compliance with the License. You may obtain a copy of the MIT License at
https://typescriptlibs.org/LICENSE.txt
Licensed under the MIT License.
You may not use this file except in compliance with the License.
You can get a copy of the License at https://typescriptlibs.org/LICENSE.txt
\*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*/

Expand Down
Loading

0 comments on commit d4ca2ff

Please sign in to comment.