Skip to content

Commit

Permalink
chore: merge nativescript-doctor into cli
Browse files Browse the repository at this point in the history
  • Loading branch information
rigor789 committed Feb 7, 2022
2 parents 9f73e96 + 8e154c8 commit 80a335a
Show file tree
Hide file tree
Showing 36 changed files with 4,953 additions and 0 deletions.
36 changes: 36 additions & 0 deletions packages/doctor/.github/workflows/npm_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: '@nativescript/doctor -> npm'

on:
push:
branches: [ 'master' ]

env:
NPM_TAG: 'next'

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup
run: npm install

- name: Generate Version
run: |
echo NPM_VERSION=$(node -e "console.log(require('./package.json').version);")-$NPM_TAG-$(date +"%m-%d-%Y")-$GITHUB_RUN_ID >> $GITHUB_ENV
- name: Bump Version
run: npm --no-git-tag-version version $NPM_VERSION

- name: Build @nativescript/doctor
run: npm run pack

- name: Publish @nativescript/doctor
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
echo "Publishing @nativescript/doctor@$NPM_VERSION to NPM with tag $NPM_TAG..."
npm publish nativescript-doctor-$NPM_VERSION.tgz --tag $NPM_TAG
69 changes: 69 additions & 0 deletions packages/doctor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages
package-lock.json

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

npm-debug.log
node_modules
docs/html
tscommand*.tmp.txt
.tscache/
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
*.tgz
*.tmp
*.sublime-workspace

pids
logs
results
scratch/
.idea/
.settings/
.vscode/
test-reports.xml

*.js
*.js.map
/lib/.d.ts
.d.ts
!/*.js
35 changes: 35 additions & 0 deletions packages/doctor/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.idea
.gitattributes
.gitmodules
*.sublime-project
lint.*
.jshint*
.npmignore
*.tgz
test-reports.xml
for-developers.md
prepublish.js
Gruntfile.js
BuildPackage.cmd
tscommand.tmp.txt
.tscache/

bin/nativescript
bin/*.cmd

lib/**/*.ts
lib/**/*.js.map

test/
.vscode
coverage/
scratch/
*.suo
.travis.yml
docs/html/
dev/

tscommand*.tmp.txt

tslint.json
tsconfig.json
11 changes: 11 additions & 0 deletions packages/doctor/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: node_js
node_js:
- '14'
git:
submodules: false
before_script:
- npm install grunt-cli
- npm install
script:
- node_modules/.bin/grunt lint
- node_modules/.bin/grunt pack --no-color
47 changes: 47 additions & 0 deletions packages/doctor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## [2.0.5](https://github.com/NativeScript/nativescript-doctor/compare/v2.0.4...v2.0.5) (2021-10-08)


### Bug Fixes

* android-31 target version ([#71](https://github.com/NativeScript/nativescript-doctor/issues/71)) ([b7c7278](https://github.com/NativeScript/nativescript-doctor/commit/b7c7278b1425950a3168784293090617c021303f))
* removed max java version limitation ([#67](https://github.com/NativeScript/nativescript-doctor/issues/67)) ([3e96ec1](https://github.com/NativeScript/nativescript-doctor/commit/3e96ec16298f5205ed2511baf94b23d36d80c454))
* **windows:** handle paths correctly ([#64](https://github.com/NativeScript/nativescript-doctor/issues/64)) ([9db60b6](https://github.com/NativeScript/nativescript-doctor/commit/9db60b64970d229c539e03b888b1e93195367da4))



## [2.0.4](https://github.com/NativeScript/nativescript-doctor/compare/v2.0.3...v2.0.4) (2020-09-06)


### Bug Fixes

* runtime version validation and getMaxSupportedCompileVersion ([a7d71a0](https://github.com/NativeScript/nativescript-doctor/commit/a7d71a0dde6e174d507098dad388ba7d6db3163b))



## [2.0.3](https://github.com/NativeScript/nativescript-doctor/compare/v2.0.1...v2.0.3) (2020-09-06)


### Bug Fixes

* support tgz runtime versions ([20641e7](https://github.com/NativeScript/nativescript-doctor/commit/20641e7528c189161138822504389436ce6805ce))



## [2.0.1](https://github.com/NativeScript/nativescript-doctor/compare/v1.14.2...v2.0.1) (2020-09-06)


### Features

* nativescript 7 support ([6b88f4c](https://github.com/NativeScript/nativescript-doctor/commit/6b88f4c2195cf15e20e9df043270b1cf105093fe))



## [1.14.2](https://github.com/NativeScript/nativescript-doctor/compare/v1.14.1...v1.14.2) (2020-06-25)


### Features

* **android:** support v30 ([#61](https://github.com/NativeScript/nativescript-doctor/issues/61)) ([20612a2](https://github.com/NativeScript/nativescript-doctor/commit/20612a2b36bbe684dfe7b9c7191399c8bade9773))



113 changes: 113 additions & 0 deletions packages/doctor/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
module.exports = function (grunt) {
grunt.initConfig({
ts: {
options: grunt.file.readJSON("tsconfig.json").compilerOptions,

devlib: {
src: ["lib/**/*.ts", "typings/**/*.ts"],
reference: "lib/.d.ts"
},

devall: {
src: ["lib/**/*.ts", "test/**/*.ts", "typings/**/*.ts"],
reference: "lib/.d.ts"
},

release_build: {
src: ["lib/**/*.ts", "test/**/*.ts", "typings/**/*.ts"],
reference: "lib/.d.ts",
options: {
sourceMap: false,
removeComments: true
}
}
},

tslint: {
build: {
files: {
src: ["lib/**/*.ts", "test/**/*.ts", "typings/**/*.ts", "!**/*.d.ts"]
},
options: {
configuration: grunt.file.readJSON("./tslint.json"),
project: "tsconfig.json"
}
}
},

watch: {
devall: {
files: ["lib/**/*.ts", 'test/**/*.ts'],
tasks: [
'ts:devall',
'shell:npm_test'
],
options: {
atBegin: true,
interrupt: true
}
},
ts: {
files: ["lib/**/*.ts", "test/**/*.ts"],
tasks: [
'ts:devall'
],
options: {
atBegin: true,
interrupt: true
}
}
},

shell: {
options: {
stdout: true,
stderr: true,
failOnError: true
},
build_package: {
command: "npm pack"
},
npm_test: {
command: "npm test"
}
},

clean: {
src: ["test/**/*.js*", "lib/**/*.js*", "!lib/hooks/**/*.js", "!Gruntfile.js", "*.tgz"]
}
});

grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-shell");
grunt.loadNpmTasks("grunt-ts");
grunt.loadNpmTasks("grunt-tslint");

grunt.registerTask("delete_coverage_dir", function () {
var done = this.async();
var rimraf = require("rimraf");
rimraf("coverage", function (err) {
if (err) {
console.log("Error while deleting coverage directory from the package: ", err);
done(false);
}

done();
});
});

grunt.registerTask("test", ["ts:devall", "shell:npm_test"]);

grunt.registerTask("pack", [
"clean",
"ts:release_build",
"shell:npm_test",
"delete_coverage_dir",
"shell:build_package"
]);
grunt.registerTask("lint", ["tslint:build"]);
grunt.registerTask("all", ["clean", "test", "lint"]);
grunt.registerTask("rebuild", ["clean", "ts:devlib"]);
grunt.registerTask("default", "ts:devlib");
};
Loading

0 comments on commit 80a335a

Please sign in to comment.