chore: move to npm

This commit is contained in:
Mattia Astorino 2022-12-01 18:20:24 +01:00
parent f07bc15682
commit 5f82d79866
No known key found for this signature in database
GPG key ID: D5713A99B7005A59
7 changed files with 12638 additions and 4146 deletions

View file

@ -22,24 +22,25 @@ jobs:
with: with:
node-version: '12.x' node-version: '12.x'
- name: Get yarn cache directory path - name: Get npm cache directory
id: yarn-cache-dir-path id: npm-cache-dir
run: echo "::set-output name=dir::$(yarn cache dir)" run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2 - uses: actions/cache@v3
id: yarn-cache id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with: with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: | restore-keys: |
${{ runner.os }}-yarn- ${{ runner.os }}-node-
- name: Install Dependencies - name: Install Dependencies
run: yarn --frozen-lockfile run: npm ci
if: steps.cache-yarn-cache.outputs.cache-hit != 'true' || steps.cache-node-modules.outputs.cache-hit != 'true' if: steps.cache-npm-cache.outputs.cache-hit != 'true' || steps.cache-node-modules.outputs.cache-hit != 'true'
- name: Build extension - name: Build extension
run: yarn build run: npm run build
- uses: lannonbr/vsce-action@master - uses: lannonbr/vsce-action@master
with: with:

View file

@ -1,6 +0,0 @@
language: node_js
node_js:
- '8'
script:
- yarn test

View file

@ -14,4 +14,4 @@ test/**
tsconfig.json tsconfig.json
typings/** typings/**
vsc-extension-quickstart.md vsc-extension-quickstart.md
yarn.lock package-lock.lock

View file

@ -13,6 +13,15 @@
- [Installing and compiling source](#installing-and-compiling-source) - [Installing and compiling source](#installing-and-compiling-source)
- [Testing the theme](#testing-the-theme) - [Testing the theme](#testing-the-theme)
- [Adding new Material Theme commands](#adding-new-material-theme-commands) - [Adding new Material Theme commands](#adding-new-material-theme-commands)
- [index.ts](#indexts)
- [Example of `async` exported `function`](#example-of-async-exported-function)
- [Example of `sync` exported `function`](#example-of-sync-exported-function)
- [Using external "mini" modules](#using-external-mini-modules)
- [Register the command](#register-the-command)
- [Add to package.json](#add-to-packagejson)
- [Build and run](#build-and-run)
- [Test your command](#test-your-command)
- [Adding new custom setting](#adding-new-custom-setting)
- [Financial contributions](#financial-contributions) - [Financial contributions](#financial-contributions)
- [Credits](#credits) - [Credits](#credits)
- [Contributors](#contributors) - [Contributors](#contributors)
@ -21,12 +30,10 @@
## Installing and compiling source ## Installing and compiling source
First you will have to install node_modules through npm or yarn First you will have to install node_modules through npm
```shell ```shell
npm install npm install
# or
yarn install
``` ```
To compile to the source code, you have to execute the build task through visual studio code. To compile to the source code, you have to execute the build task through visual studio code.

12604
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -32,7 +32,7 @@
"vscode": "^1.51.0" "vscode": "^1.51.0"
}, },
"scripts": { "scripts": {
"build": "yarn cleanup && yarn build:ts && yarn build:generate-themes && yarn build:ui", "build": "run-s cleanup build:ts build:generate-themes build:ui",
"cleanup": "rimraf build && rimraf dist", "cleanup": "rimraf build && rimraf dist",
"lint": "eslint .", "lint": "eslint .",
"build:ui": "node dist/scripts/ui/index.js", "build:ui": "node dist/scripts/ui/index.js",
@ -188,6 +188,7 @@
"eslint-config-xo-typescript": "0.31.0", "eslint-config-xo-typescript": "0.31.0",
"fs-extra": "9.0.1", "fs-extra": "9.0.1",
"ncp": "2.0.0", "ncp": "2.0.0",
"npm-run-all": "4.1.5",
"standard-version": "9.0.0", "standard-version": "9.0.0",
"typescript": "4.1.3", "typescript": "4.1.3",
"vscode": "1.1.37" "vscode": "1.1.37"

4115
yarn.lock

File diff suppressed because it is too large Load diff