Skip to content

Commit 6ea3d9c

Browse files
Getting plugin standardise
1 parent 3e232b6 commit 6ea3d9c

File tree

11 files changed

+323
-208
lines changed

11 files changed

+323
-208
lines changed

.appveyor.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: test
2+
on:
3+
push:
4+
5+
concurrency:
6+
group: branch-node-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node: [12, 14, 16]
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-node@v2
18+
with:
19+
node-version: ${{ matrix.node }}
20+
21+
- run: npm i
22+
- run: npm run build
23+
- run: npm run test

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ package-lock.json
99
!.gitignore
1010
!.rollup.js
1111
!.tape.js
12-
!.travis.yml
12+
!.github
13+
dist

.rollup.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
import babel from "@rollup/plugin-babel";
1+
import babel from '@rollup/plugin-babel';
22

33
export default {
4-
input: "index.js",
5-
output: [
6-
{ file: "index.cjs.js", format: "cjs" },
7-
{ file: "index.es.mjs", format: "es" },
8-
],
9-
plugins: [
10-
babel({
11-
babelHelpers: "bundled",
12-
presets: [
13-
["@babel/preset-env", { modules: false, targets: { node: 6 } }],
14-
],
15-
}),
16-
],
4+
input: 'src/index.js',
5+
output: [
6+
{ file: 'dist/index.cjs', format: 'cjs', sourcemap: false, strict: false, exports: 'auto' },
7+
{ file: 'dist/index.mjs', format: 'esm', sourcemap: false, strict: false, exports: 'auto' },
8+
],
9+
plugins: [
10+
babel({
11+
presets: [
12+
['@babel/env', { modules: false, targets: { node: 12 } }],
13+
],
14+
}),
15+
],
1716
};

.tape.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
11
const processOptions = {
22
map: {
33
inline: true,
4-
sourcesContent: true
5-
}
4+
sourcesContent: true,
5+
},
66
};
77

88
module.exports = {
99
'basic': {
1010
message: 'supports basic usage',
1111
processOptions,
12-
source: 'basic.scss'
12+
source: 'basic.scss',
1313
},
1414
'basic:sassopts': {
1515
message: 'supports sass options usage',
1616
options: {
1717
indentType: 'tab',
1818
indentWidth: 1,
19-
outputStyle: 'expanded'
19+
outputStyle: 'expanded',
2020
},
2121
processOptions,
22-
source: 'basic.scss'
22+
source: 'basic.scss',
2323
},
2424
'basic:mixed': {
2525
message: 'supports mixed (postcss-unroot, postcss-sass) usage',
2626
plugin: require('postcss')([
2727
// In the previous test, unroot wouldn't do anything.
2828
// I'm pretty sure that is a bug, so I changed the expected css file
2929
require('postcss-unroot'),
30-
require('.')
30+
require('.'),
3131
]),
3232
processOptions,
33-
source: 'basic.scss'
33+
source: 'basic.scss',
3434
},
3535
'imports': {
3636
message: 'supports imports usage',
3737
plugin: require('postcss')(
38-
require('.')
38+
require('.'),
3939
),
4040
processOptions,
41-
source: 'imports.scss'
41+
source: 'imports.scss',
4242
},
4343
'postcss-imports': {
4444
message: 'supports imports (postcss-sass, postcss-import) usage',
4545
plugin: require('postcss')(
4646
// Unsure what happened to postcss-import but it no longer imports without .scss at the end
4747
require('.'),
48-
require('postcss-import')
48+
require('postcss-import'),
4949
),
5050
processOptions: Object.assign({}, processOptions, {
51-
syntax: require('postcss-scss')
51+
syntax: require('postcss-scss'),
5252
}),
53-
source: 'postcss-imports.scss'
54-
}
53+
source: 'postcss-imports.scss',
54+
},
5555
};

.travis.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting Jonathan Neal <[email protected]>. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

index.js

Lines changed: 0 additions & 136 deletions
This file was deleted.

0 commit comments

Comments
 (0)