Skip to content

Commit ceeb0f3

Browse files
Migrate from Gulp to Parcel build system, first draft, Ref: DEV-439
1 parent 486e1ef commit ceeb0f3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+25284
-23351
lines changed

.browserslistrc

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
last 1 edge version
2-
last 1 safari version
3-
last 1 chrome version
4-
last 1 firefox version
5-
not firefox > 90
1+
# Browsers supported by air-light theme
2+
> 0.5%
3+
last 2 versions
4+
Firefox ESR
65
not dead
7-
not ie > 0
8-
not ucandroid > 0
9-
not firefoxandroid > 0
10-
not samsung > 0
11-
not op_mob > 0
12-
> 1% in FI
6+
not IE 11

.github/workflows/js.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ jobs:
2323
- name: Install packages and test JS
2424
run: |
2525
npm i
26-
npx eslint -c .eslintrc.js js/src/
26+
npm run lint
27+
npm run js

.github/workflows/styles.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ jobs:
2525

2626
- name: Run stylelint
2727
run: |
28-
npx stylelint . --max-warnings 0 --config .stylelintrc
28+
npx stylelint sass/**/*.scss --max-warnings 0
2929
30-
- name: Run gulp task devstyles
30+
- name: Build development styles with Parcel
3131
run: |
3232
# Make the command visible
33-
echo "Running npx gulp devstyles..."
34-
npx gulp devstyles
33+
echo "Running npm run devstyles..."
34+
npm run devstyles
3535
3636
# Capture the output
37-
output=$(npx gulp devstyles 2>&1)
37+
output=$(npm run devstyles 2>&1)
3838
3939
# Save it to a temporary file
4040
echo "$output" > output.txt

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.parcel-cache
12
vendor/
23
templates/
34
content/

.husky/pre-commit

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,22 +126,22 @@ if [ ! -d ".github/workflows" ]; then
126126
fi
127127
echo "${GREEN}${CHECK} OK${NC}"
128128

129-
printf " ${ARROW} Checking for gulpfile.js... "
130-
if [ ! -f "gulpfile.js" ]; then
129+
printf " ${ARROW} Checking for parcel in package.json... "
130+
if [ -f "package.json" ] && ! npm list parcel >/dev/null 2>&1; then
131131
echo "${RED}${CROSS} FAILED${NC}"
132-
echo " ${RED}gulpfile.js is missing from root directory${NC}"
133-
echo " ${YELLOW}Please ensure Gulp is properly set up${NC}"
132+
echo " ${RED}Parcel is not installed${NC}"
133+
echo " ${YELLOW}Please install Parcel:${NC}"
134+
echo " ${BLUE}nvm use${NC}"
135+
echo " ${BLUE}npm install parcel --save-dev${NC}"
134136
exit 1
135137
fi
136138
echo "${GREEN}${CHECK} OK${NC}"
137139

138-
printf " ${ARROW} Checking for gulp in package.json... "
139-
if [ -f "package.json" ] && ! npm list gulp >/dev/null 2>&1; then
140+
printf " ${ARROW} Checking for parcel config files... "
141+
if [ ! -f ".parcelrc" ] && [ ! -f ".parcelrc.watch" ]; then
140142
echo "${RED}${CROSS} FAILED${NC}"
141-
echo " ${RED}Gulp is not installed${NC}"
142-
echo " ${YELLOW}Please install Gulp:${NC}"
143-
echo " ${BLUE}nvm use${NC}"
144-
echo " ${BLUE}npm install gulp --save-dev${NC}"
143+
echo " ${RED}Parcel configuration files are missing${NC}"
144+
echo " ${YELLOW}Please ensure Parcel is properly configured${NC}"
145145
exit 1
146146
fi
147147
echo "${GREEN}${CHECK} OK${NC}"

.parcelrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "@parcel/config-default",
3+
"transformers": {
4+
"*.{sass,scss}": ["@parcel/transformer-sass"]
5+
},
6+
"optimizers": {
7+
"*.css": ["@parcel/optimizer-css"]
8+
}
9+
}

.parcelrc.watch

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "@parcel/config-default",
3+
"transformers": {
4+
"*.{sass,scss}": ["@parcel/transformer-sass"],
5+
"*.{woff,woff2,ttf,otf}": ["@parcel/transformer-raw"]
6+
},
7+
"optimizers": {
8+
"*.css": [],
9+
"*.js": []
10+
}
11+
}

.postcssrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"plugins": {
3+
"postcss-calc": {},
4+
"cssnano": {
5+
"preset": [
6+
"cssnano-preset-advanced",
7+
{
8+
"discardUnused": false,
9+
"reduceInitial": false,
10+
"discardComments": {
11+
"removeAll": true
12+
}
13+
}
14+
]
15+
}
16+
}
17+
}

.postcssrc.dev

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": {}
3+
}

.sassrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"includePaths": [
3+
"sass",
4+
"node_modules"
5+
],
6+
"quietDeps": true,
7+
"silenceDeprecations": ["legacy-js-api", "import"]
8+
}

0 commit comments

Comments
 (0)