Skip to content

Commit c856ff3

Browse files
committed
chore: replace grunt with npm scripts
Grunt's remaining tasks were mostly thin wrappers around tsc, npm test and npm pack; the rest were small file-manipulation tasks that now live in scripts/: - ts:* -> tsc (+ tsconfig.release.json) - clean -> scripts/clean.js - generate/verify unit test deps -> scripts/generate-test-deps.js - set_live_ga_id/set_dev_ga_id/... -> scripts/set-ga-id.js - template (docs-jekyll) -> scripts/build-docs.js prepack now runs the release compile after the tests rather than before, so removeComments and sourceMap are no longer overwritten by the dev compile that npm test performs. Also drops BuildPackage.cmd, last changed in 2014 and calling a grunt task that no longer exists, and the grunt/globule minimatch overrides, which no longer resolve to anything in the tree.
1 parent a40706a commit c856ff3

12 files changed

Lines changed: 268 additions & 3719 deletions

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,4 @@ lib/common/test-reports.xml
8787
!lib/common/test-scripts/**
8888
!lib/common/scripts/**
8989
config/test-deps-versions-generated.json
90-
!scripts/get-next-version.js
91-
!scripts/get-npm-tag.js
90+
!scripts/*.js

BuildPackage.cmd

Lines changed: 0 additions & 12 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Before you submit a Pull Request, consider the following guidelines.
3333
```bash
3434
git clone git@github.com:NativeScript/nativescript-cli.git
3535
```
36-
* Run the setup script. This will initialize the git submodule, install the node dependencies and build with grunt.
36+
* Run the setup script. This will install the node dependencies and set up the git hooks.
3737
```bash
3838
npm run setup
3939
```
@@ -44,15 +44,15 @@ Before you submit a Pull Request, consider the following guidelines.
4444
* Create your patch and include appropriate test cases.
4545
* Build your changes locally.
4646
```bash
47-
./node_modules/.bin/grunt
47+
npm run build
4848
```
4949
* Ensure all the tests pass.
5050
```bash
51-
./node_modules/.bin/grunt test
51+
npm test
5252
```
53-
* Ensure that your code passes the linter.
53+
* Ensure that your code is formatted.
5454
```bash
55-
./node_modules/.bin/grunt lint
55+
npm run prettier
5656
```
5757
* Commit your changes following the [commit message guidelines](https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#-commit-message-guidelines) (the commit message is used to generate release notes).
5858
```bash

Gruntfile.js

Lines changed: 0 additions & 297 deletions
This file was deleted.

docs/build-jekyll-md.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ set -e
44
rm -rf docs-cli
55
npm install --ignore-scripts
66

7-
npx grunt docs-jekyll
7+
npm run docs-jekyll

0 commit comments

Comments
 (0)