Skip to content

Commit b70c556

Browse files
authored
Merge pull request #67 from 3daddict/feature/jit-engine-2
tailwindcss update and JIT engine update, not pretty but its working
2 parents a61dc1e + 723f5f0 commit b70c556

File tree

6 files changed

+31
-34
lines changed

6 files changed

+31
-34
lines changed

package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,50 +7,50 @@
77
"author": "Mike Salvati",
88
"private": true,
99
"scripts": {
10-
"start": "webpack serve --mode=development --config webpack.dev.js",
11-
"build": "webpack --mode=production --config webpack.prod.js && npx tailwindcss build src/components/tailwind.css -o dist/assets/tailwind.css.liquid && cleancss -o dist/assets/tailwind.min.css.liquid dist/assets/tailwind.css.liquid",
12-
"deploy": "webpack --mode=production --config webpack.prod.js && npx tailwindcss build src/components/tailwind.css -o dist/assets/tailwind.css.liquid && cleancss -o dist/assets/tailwind.min.css.liquid dist/assets/tailwind.css.liquid && shopify-themekit deploy --env=production"
10+
"start": "TAILWIND_MODE=watch webpack serve --mode=development --config webpack.dev.js",
11+
"build": "webpack --mode=production --config webpack.prod.js && npx tailwindcss build -i src/components/tailwind.css -o dist/assets/tailwind.css.liquid && cleancss -o dist/assets/tailwind.min.css.liquid dist/assets/tailwind.css.liquid",
12+
"deploy": "webpack --mode=production --config webpack.prod.js && npx tailwindcss build -i src/components/tailwind.css -o dist/assets/tailwind.css.liquid && cleancss -o dist/assets/tailwind.min.css.liquid dist/assets/tailwind.css.liquid && shopify-themekit deploy --env=production"
1313
},
1414
"dependencies": {
1515
"validator": "^13.5.2"
1616
},
1717
"devDependencies": {
1818
"@babel/core": "^7.12.10",
19+
"@babel/eslint-parser": "^7.14.7",
1920
"@babel/plugin-transform-runtime": "^7.12.10",
2021
"@babel/preset-env": "^7.12.11",
21-
"@shopify/eslint-plugin": "^39.0.4",
22+
"@shopify/eslint-plugin": "^40.4.0",
2223
"@shopify/themekit": "^1.1.7",
23-
"autoprefixer": "^10.2.3",
24+
"autoprefixer": "^10.3.1",
2425
"axios": "^0.21.1",
25-
"babel-eslint": "^10.1.0",
2626
"babel-loader": "^8.2.2",
2727
"babel-plugin-transform-class-properties": "^6.24.1",
2828
"browser-sync": "^2.26.14",
29-
"clean-css-cli": "^4.3.0",
30-
"clean-webpack-plugin": "^3.0.0",
29+
"clean-css-cli": "^5.3.0",
30+
"clean-webpack-plugin": "^4.0.0-alpha.0",
3131
"copy-webpack-plugin": "6.x",
3232
"core-js": "^3.8.3",
33-
"css-loader": "^5.0.1",
33+
"css-loader": "^6.2.0",
3434
"debug": "^4.3.1",
35-
"eslint": "7.18.0",
36-
"eslint-config-prettier": "^7.2.0",
37-
"eslint-webpack-plugin": "^2.4.3",
35+
"eslint": "^7.31.0",
36+
"eslint-config-prettier": "^8.3.0",
37+
"eslint-webpack-plugin": "^3.0.1",
3838
"file-loader": "^6.2.0",
3939
"glob": "^7.1.6",
4040
"graphql": "^15.5.0",
41-
"html-webpack-plugin": "^4.5.1",
41+
"html-webpack-plugin": "^5.3.2",
4242
"liquidjs": "^9.20.1",
43-
"mini-css-extract-plugin": "^1.3.4",
43+
"mini-css-extract-plugin": "^2.1.0",
4444
"node-fetch": "^2.6.1",
45-
"node-sass": "^5.0.0",
46-
"postcss": "^8.2.4",
47-
"postcss-loader": "^4.2.0",
45+
"node-sass": "^6.0.1",
46+
"postcss": "^8.3.6",
47+
"postcss-loader": "^6.1.1",
4848
"prettier": "^2.2.1",
4949
"raw-loader": "^4.0.2",
5050
"sass": "^1.32.5",
51-
"sass-loader": "^10.1.1",
52-
"style-loader": "^2.0.0",
53-
"tailwindcss": "^2.0.2",
51+
"sass-loader": "^12.1.0",
52+
"style-loader": "^3.2.1",
53+
"tailwindcss": "^2.2.7",
5454
"transform-class-properties": "^1.0.0-beta",
5555
"typescript": "^4.1.3",
5656
"webpack": "^5.18.0",
@@ -60,6 +60,6 @@
6060
"webpack-merge": "^5.7.3",
6161
"webpack-shell-plugin-next": "^2.2.2",
6262
"yaml": "^1.10.0",
63-
"yargs": "^16.2.0"
63+
"yargs": "^17.0.1"
6464
}
6565
}

postcss.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
module.exports = {
2-
plugins: [require('autoprefixer')],
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
}
36
};

shopify-dev-utils/tags/paginate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ exports.Paginate = {
6161
.on('start', () => {
6262
const toknenizer = new liquidjs_1.Tokenizer(tagToken.args);
6363
const list = toknenizer.readValue();
64-
const by = toknenizer.readWord();
64+
const by = toknenizer.readIdentifier();
6565
const perPage = toknenizer.readValue();
6666
liquidjs_1.assert(list.size() &&
6767
by.content === 'by' &&

src/components/layout/theme.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import '../tailwind.css';
12

23
const themeFunction = () => 'Theme JS ES6 Function!';
34
console.log(themeFunction());

tailwind.config.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
const mode = process.env.NODE_ENV === 'development' ? 'development' : 'production';
22

33
module.exports = {
4-
future: {
5-
removeDeprecatedGapUtilities: true,
6-
purgeLayersByDefault: true,
7-
},
4+
mode: 'jit',
85
purge: {
96
enabled: mode === "development" ? false : true,
10-
content: [
11-
'./dist/layout/*.liquid',
12-
'./dist/templates/*.liquid',
13-
'./dist/sections/*.liquid',
14-
'./dist/snippets/*.liquid',
15-
],
7+
content: ["./src/**/*.{js,liquid}"],
168
},
9+
darkMode: false,
1710
theme: {
1811
extend: {},
1912
},

webpack.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ module.exports = merge(common, {
9393
'cleancss -o dist/assets/tailwind.min.css.liquid dist/assets/tailwind.css.liquid',
9494
'echo -- Deploying to theme ✈️',
9595
'shopify-themekit deploy --env=development',
96-
'echo -- Deployment competed ✓',
96+
'echo -- Deployment completed ✓',
9797
'shopify-themekit open',
9898
],
9999
blocking: true,

0 commit comments

Comments
 (0)