Skip to content

Commit

Permalink
Merge pull request #97 from RyanClementsHax/switch-to-npm
Browse files Browse the repository at this point in the history
build(npm): switch to using npm
  • Loading branch information
RyanClementsHax authored Sep 30, 2023
2 parents 3dda1fb + 79e085e commit f18868f
Show file tree
Hide file tree
Showing 33 changed files with 57,368 additions and 26,635 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
uses: actions/checkout@v2
- name: restore dependencies
uses: bahmutov/npm-install@v1
- run: yarn lint:all
- run: npm run lint:all
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: restore dependencies
uses: bahmutov/npm-install@v1
- run: yarn test
- run: npm run test
type_check:
name: type check
runs-on: ubuntu-latest
Expand All @@ -29,4 +29,4 @@ jobs:
uses: actions/checkout@v2
- name: restore dependencies
uses: bahmutov/npm-install@v1
- run: yarn type-check
- run: npm run type-check
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: restore dependencies
uses: bahmutov/npm-install@v1
- name: release
run: yarn release
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
npx lint-staged
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn test:all
npm run test:all
8 changes: 4 additions & 4 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"*.@(ts|tsx|js|jsx)": ["yarn lint:js", "yarn format"],
"*.json": ["yarn format"],
"*.*rc": ["yarn format --parser json"],
"*.@(css|scss)": ["yarn lint:styles", "yarn format"]
"*.@(ts|tsx|js|jsx)": ["npm run lint:js", "npm run format"],
"*.json": ["npm run format"],
"*.*rc": ["npm run format -- --parser json"],
"*.@(css|scss)": ["npm run lint:styles", "npm run format"]
}
6 changes: 0 additions & 6 deletions .prettierrc.json

This file was deleted.

1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"npm.packageManager": "yarn",
"css.validate": false,
"less.validate": false,
"scss.validate": false,
Expand Down
35 changes: 0 additions & 35 deletions .vscode/tasks.json

This file was deleted.

16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If you are here to suggest a feature, feel free to [start a discussion](https://
The fastest way to work on the repository is by using [Stackblitz's Codeflow](https://stackblitz.com/codeflow)

1. Click the `Open in Codeflow` button on this repo's README (or go directly to [this link](https:///pr.new/RyanClementsHax/tailwindcss-themer))
2. Run the build using `yarn watch`
2. Run the build using `npm run watch`
3. Implement your changes and tests to files in the `src/` directory and corresponding test files
4. Use the example repos to integration test changes
5. Document your changes in the appropriate doc page
Expand All @@ -31,9 +31,8 @@ The fastest way to work on the repository is by using [Stackblitz's Codeflow](ht
If you prefer to not use Stackblitz for faster development, you can still do this the old fashioned way.

1. Fork this repository
2. Install dependencies by running `yarn install`
- We use [yarn](https://yarnpkg.com/) v7 for package management
3. Run the build using `yarn watch`
2. Install dependencies by running `npm install`
3. Run the build using `npm run watch`
4. Implement your changes and tests to files in the `src/` directory and corresponding test files
5. Use the example repos to integration test changes
6. Document your changes in the appropriate doc page
Expand All @@ -44,10 +43,11 @@ If you prefer to not use Stackblitz for faster development, you can still do thi

All examples are located in the `examples` directory of this repo.

1. Make sure you run `yarn watch` in the root of `tailwindcss-themer` to build the plugin and watch for any changes
2. Make sure you've installed the dependencies by running `yarn install` in the repo's root directory
3. Run `yarn start` in the selected examples' directory
4. After making a change to the plugin, restart the example's server (i.e. rerun `yarn start`) so that it picks up the changes
1. Run `npm run watch` in the root of `tailwindcss-themer` to build the plugin and watch for any changes
2. Replace the `"tailwindcss-themer": "latest"` line in the example project's `package.json` with `"tailwindcss-themer": "file:../../"`
3. Run`npm install` in the repo's root directory
4. Run `npm run start` in the selected example's directory
5. After making a change to the plugin, restart the example's server (i.e. rerun `npm run start`) so that it picks up the changes

## Commit message conventions

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ An unopinionated, scalable, [tailwindcss](https://tailwindcss.com/) theming solu

### Installation

Install `tailwindcss-themer` using [`yarn`](https://yarnpkg.com/en/package/tailwindcss-themer):
Install `tailwindcss-themer` using [`npm`](https://www.npmjs.com/package/tailwindcss-themer):

```bash
yarn add --dev tailwindcss-themer
npm install --save-dev tailwindcss-themer
```

Or [`npm`](https://www.npmjs.com/package/tailwindcss-themer):
or [`yarn`](https://yarnpkg.com/en/package/tailwindcss-themer):

```bash
npm install --save-dev tailwindcss-themer
yarn add --dev tailwindcss-themer
```

### Add the Plugin
Expand Down
4 changes: 2 additions & 2 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ This is a basic example to demonstrate `tailwindcss-themer`

## Getting Started

`yarn install`
`npm install`

`yarn start`
`npm run start`
Loading

0 comments on commit f18868f

Please sign in to comment.