-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Masafumi Koba <[email protected]> Co-authored-by: Richard Hallows <[email protected]> Co-authored-by: Marc G. <[email protected]>
- Loading branch information
1 parent
bd5891b
commit c6d6ada
Showing
14 changed files
with
13,673 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Testing | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
lint: | ||
uses: stylelint/.github/.github/workflows/lint.yml@main | ||
test: | ||
uses: stylelint/.github/.github/workflows/test.yml@main | ||
with: | ||
node-version: '["14", "16", "18"]' | ||
os: '["ubuntu-latest", "windows-latest", "macos-latest"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*~ | ||
*[._]sw[g-p] | ||
.eslintcache | ||
|
||
node_modules/ | ||
.idea/ | ||
.vscode/ | ||
*.log | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
# stylelint-create | ||
# stylelint-create | ||
|
||
The [`npm init`](https://docs.npmjs.com/cli/v9/commands/npm-init) script for [Stylelint](https://github.com/stylelint/stylelint). | ||
|
||
## Usage | ||
|
||
Run `npm init stylelint` | ||
|
||
## Contributing | ||
|
||
- `npm install` | ||
- to test locally, run `node create-stylelint.mjs` | ||
- to test with [Vitest](https://vitest.dev/), `npm test` | ||
|
||
## Acknowledgements | ||
|
||
Inspired by [create-astro](https://github.com/withastro/astro/blob/main/packages/create-astro). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env node | ||
/* eslint-disable no-process-exit */ | ||
/* eslint-disable no-console */ | ||
'use strict'; | ||
|
||
const currentVersion = process.versions.node; | ||
|
||
import { fileURLToPath } from 'node:url'; | ||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import semver from 'semver'; | ||
|
||
const dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
const pkg = JSON.parse(fs.readFileSync(path.join(dirname, 'package.json').toString())); | ||
|
||
if (!semver.satisfies(currentVersion, pkg.engines.node)) { | ||
console.error(`Unsupported Node.js version (v${currentVersion})`); | ||
console.error(`Install a Node.js version within "${pkg.engines.node}" and then try again.`); | ||
process.exit(1); | ||
} | ||
|
||
// eslint-disable-next-line node/no-unsupported-features/es-syntax | ||
import('./src/index.mjs').then(({ main }) => main()); |
Oops, something went wrong.