Skip to content

Migrate postcss-preset-env #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/bin/install-and-test-all-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ set -e

start_dir=$(pwd)

for package in $(ls -d ./packages); do
for package in $(ls -d ./packages/*); do
echo "Installing and testing $package"
cd $package
npm install --ignore-scripts
npm test
npm run test
cd $start_dir
done


for package in $(ls -d ./plugins); do
for package in $(ls -d ./plugins/*); do
echo "Installing and testing $package"
cd $package
npm install --ignore-scripts
npm test
npm run test
cd $start_dir
done

for package in $(ls -d ./plugin-packs); do
for package in $(ls -d ./plugin-packs/*); do
echo "Installing and testing $package"
cd $package
npm install --ignore-scripts
npm test
npm run test
cd $start_dir
done
22 changes: 22 additions & 0 deletions .github/workflows/test-node-without-workspaces.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: test node without workspaces
on:
push:

jobs:
test_without_workspaces_support:
runs-on: ubuntu-latest
strategy:
matrix:
node: [12, 14]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- run: npm install --ignore-scripts
- run: npm run build --workspaces --if-present

- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: bash ./.github/bin/install-and-test-all-packages.sh
54 changes: 26 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,52 +14,50 @@ jobs:
with:
node-version: ${{ matrix.node }}

- run: exit 0
# - run: npm install --ignore-scripts
# - run: npm run build --workspaces --if-present
# - run: npm run lint --workspaces --if-present
# - run: npm run test --workspaces --if-present
- run: npm install --ignore-scripts
- run: npm run build --workspaces --if-present
- run: npm run lint --workspaces --if-present
- run: npm run test --workspaces --if-present

test_without_workspaces_support:
runs-on: ubuntu-latest
# Run cross platform test of the basic CLI.
test_cli:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [12, 14]
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16

- run: exit 0
# - run: npm install --ignore-scripts
# - run: npm run build --workspaces --if-present
- run: npm install --ignore-scripts
- run: npm run build --workspaces --if-present

- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
# running "npm install" places the cli in node_modules/bin
- run: npm install --ignore-scripts

- run: exit 0
# - run: bash ./.github/bin/install-and-test-all-packages.sh
- run: |
npm run test --workspace="@csstools/base-cli"
npm run test:cli --workspace="@csstools/postcss-base-plugin"

# Run cross platform test of the basic CLI.
test_cli:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
# Run Deno tests one by one
test_deno:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16

- run: npm install --ignore-scripts
# - run: npm run build --workspaces --if-present
- run: npm run build --workspaces --if-present

- uses: denoland/setup-deno@v1
with:
deno-version: v1.x.x

# Per plugin from here
- run: |
npm run build --workspace="@csstools/base-cli" --workspace="@csstools/postcss-base-plugin"
# running install places the cli in node_modules/bin
npm install
npm run test --workspace="@csstools/base-cli"
npm run test:cli --workspace="@csstools/postcss-base-plugin"
cd plugins/postcss-nesting
npm run test:deno
15 changes: 0 additions & 15 deletions plugin-packs/postcss-preset-env/.editorconfig

This file was deleted.

1 change: 0 additions & 1 deletion plugin-packs/postcss-preset-env/.gitattributes

This file was deleted.

18 changes: 0 additions & 18 deletions plugin-packs/postcss-preset-env/.github/workflows/test.yml

This file was deleted.

8 changes: 4 additions & 4 deletions plugin-packs/postcss-preset-env/.gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
dist
node_modules
dist
package-lock.json
yarn.lock
*.log*
*.result.css
.*
*.result.css.map
!.editorconfig
!.gitattributes
!.github
!.gitignore
!.rollup.js
!.tape.js
!.travis.yml
!.github
9 changes: 0 additions & 9 deletions plugin-packs/postcss-preset-env/.rollup.js

This file was deleted.

6 changes: 3 additions & 3 deletions plugin-packs/postcss-preset-env/.tape.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ module.exports = {
},
insertBefore: {
'color-mod-function': [
require('postcss-simple-vars')
require('postcss-simple-vars')()
]
}
}
Expand All @@ -93,7 +93,7 @@ module.exports = {
options: {
stage: 1,
insertAfter: {
'color-mod-function': require('postcss-simple-vars')
'color-mod-function': require('postcss-simple-vars')()
}
},
},
Expand All @@ -113,7 +113,7 @@ module.exports = {
stage: 1,
insertAfter: {
'color-mod-function': [
require('postcss-simple-vars')
require('postcss-simple-vars')()
]
},
features: {
Expand Down
75 changes: 0 additions & 75 deletions plugin-packs/postcss-preset-env/CONTRIBUTING.md

This file was deleted.

10 changes: 1 addition & 9 deletions plugin-packs/postcss-preset-env/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,7 @@ Add [PostCSS Preset Env] to your project:
npm install postcss-preset-env --save-dev
```

Use [PostCSS Preset Env] to process your CSS:

```js
const postcssPresetEnv = require('postcss-preset-env');

postcssPresetEnv.process(YOUR_CSS /*, processOptions, pluginOptions */);
```

Or use it as a [PostCSS] plugin:
Use [PostCSS Preset Env] as a [PostCSS] plugin:

```js
const postcss = require('postcss');
Expand Down
10 changes: 1 addition & 9 deletions plugin-packs/postcss-preset-env/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,7 @@ Add [PostCSS Preset Env] to your project:
npm install postcss-preset-env --save-dev
```

Use [PostCSS Preset Env] to process your CSS:

```js
const postcssPresetEnv = require('postcss-preset-env');

postcssPresetEnv.process(YOUR_CSS /*, processOptions, pluginOptions */);
```

Or use it as a [PostCSS] plugin:
Use [PostCSS Preset Env] as a [PostCSS] plugin:

```js
const postcss = require('postcss');
Expand Down
Loading