Skip to content
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

Dump update #15

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ theme.js
theme.min.js
config.json
assets/css/pre-build
assets/js/libs
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
app.js
theme.min.css
theme.min.js
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing empty line

10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a prettier runner in grunt. it's not all IDE that will parse and correct the files and our stack should be IDE independent.

"useTabs": true,
"tabWidth": 4,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 100,
"semi": true,
"arrowParens": "always",
"endOfLine": "lf"
}
29 changes: 14 additions & 15 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const findUsedJsFiles = (grunt) => {
const file = grunt.file.read('snippets/js.liquid', 'utf8');
const file = grunt.file.read('snippets/js-modules.liquid', 'utf8');
const regex = /'([0-9a-zA-Z\-_\.]*.js)' \| asset_url/gm;

let jsFiles = [];
Expand Down Expand Up @@ -31,7 +31,6 @@ const findUsedJsLibs = (grunt) => {
};

module.exports = function (grunt) {

let shopifyConfig = grunt.file.readJSON('config.json', 'utf8');

grunt.initConfig({
Expand All @@ -41,8 +40,8 @@ module.exports = function (grunt) {
pkg: grunt.file.readJSON('package.json'),
install: {
options: {
env: ['default', 'staging', 'production']
}
env: ['default', 'staging', 'production'],
},
},
shopify: {
options: {
Expand All @@ -58,15 +57,15 @@ module.exports = function (grunt) {
'locales/*',
'sections/*',
'snippets/*',
'templates/*'
]
}
}
'templates/*',
],
},
},
});

const tasks = grunt.file.expand({ filter: 'isFile', cwd: 'tasks' }, ['*']);

tasks.forEach(task => {
tasks.forEach((task) => {
require(`./tasks/${task}`)(grunt);
});

Expand All @@ -79,22 +78,22 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-csso');
grunt.loadNpmTasks('grunt-babel');
grunt.loadNpmTasks('grunt-purgecss');
grunt.loadNpmTasks('grunt-csso');
grunt.loadNpmTasks('grunt-complexity');
grunt.loadNpmTasks('grunt-env');

grunt.registerTask('dev-js', ['complexity', 'jshint']);
grunt.registerTask('dev-js', ['jshint']);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please re-add complexity.

grunt.registerTask('dev', ['dev-js']);

grunt.registerTask('js', ['dev-js', 'clean:js', 'libs', 'concat:js', 'babel', 'headers:js']);
grunt.registerTask('css', ['clean:css','postcss', 'concat:css', 'purgecss', 'csso', 'headers:css']);
grunt.registerTask('build', ['css', 'js']);
grunt.registerTask('css', ['clean:css', 'postcss', 'csso', 'headers:css']);
grunt.registerTask('build', ['env:build', 'css', 'js']);

grunt.registerTask('deploy', ['build', 'shopify:deploy']);
grunt.registerTask('deploy:staging', ['build', 'shopify:deploy:staging']);
grunt.registerTask('deploy:prod', ['build', 'shopify:deploy:production']);
grunt.registerTask('init', ['install', 'deploy']);

grunt.registerTask('default', ['watch']);
grunt.registerTask('default', ['env:dev', 'watch']);
};
6 changes: 2 additions & 4 deletions assets/css/base/fonts.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

@font-face {
font-family: 'Font Name';
src: local('?'),
url("/assets/fonts/file-name.woff2") format('woff2'),
url("/assets/fonts/file-name.woff") format('woff');
src: local('?'), url('/assets/fonts/file-name.woff2') format('woff2'),
url('/assets/fonts/file-name.woff') format('woff');
font-weight: 400;
font-style: normal;
font-display: fallback;
Expand Down
36 changes: 23 additions & 13 deletions assets/css/base/site.css
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@
::selection {
@apply bg-main-reverse;
@apply text-main-reverse;
@apply bg-black;
@apply text-white;
}
::-moz-selection {
@apply bg-main-reverse;
@apply text-main-reverse;
@apply bg-black;
@apply text-white;
}

@media screen and (prefers-reduced-motion: reduce), (update: slow) {
*,
*::before,
*::after {
animation-duration: 0.001ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.001ms !important;
scroll-behavior: auto !important;
}
}

html {
--unit-root: 1;
--security-root: 60;
--fluid-breakpoint-root: 1560;
--perimeter-root: calc(
var(--fluid-breakpoint-root) - var(--security-root) * 2
);
--unit-in-vw: calc(
var(--unit-root) * 100 / var(--fluid-breakpoint-root) * 1vw
);
--perimeter-root: calc(var(--fluid-breakpoint-root) - var(--security-root) * 2);
--unit-in-vw: calc(var(--unit-root) * 100 / var(--fluid-breakpoint-root) * 1vw);
--unit-in-px: calc(var(--unit-root) * 1px);

--ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
--ease-out-quad: cubic-bezier(0.5, 1, 0.89, 1);

font-size: calc(var(--unit-in-vw) * 3);
scroll-behavior: smooth;

-webkit-font-smoothing: antialiased;
-webkit-tap-highlight-color: transparent;
}

body {
@apply text-current;
@apply font-sans;
@apply text-40;
@apply font-base;
}

/* Tablet */
Expand Down
3 changes: 0 additions & 3 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@

/* Utils */
@import 'tailwind/utilities.css';

/* Admin */
@import 'lib/admin.css';
61 changes: 1 addition & 60 deletions assets/js/core/app.js

Large diffs are not rendered by default.

21 changes: 14 additions & 7 deletions layout/theme.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,23 @@
</script>
</head>
<body class="{{ template.name }} {{ template.suffix }}">
{% render 'header' %}
<div id="site">
{% render 'header' %}

<main role="main">
{{ content_for_layout }}
</main>
<main>
{{ content_for_layout }}
</main>

{% render 'footer' %}

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
{% render 'footer' %}
</div>
{% render 'js' %}
<script>
(() => {
'use strict';
App.debug(true);
App.run('#site');
})();
</script>
{% render 'store-schemas' %}
</body>
</html>
Loading