Last active
February 25, 2022 00:10
-
-
Save panoply/937f614c9dfb7151308f0e7de1b1d105 to your computer and use it in GitHub Desktop.
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
export default { | |
input: 'src', // src path | |
output: 'theme', // dist path | |
export: 'export', // packed .zip theme location | |
import: 'import', // downloaded theme location | |
scripts: '.', // external config script locations, eg: postcss.config.js or webpack.config.js | |
// path mappings (src to dist) | |
paths: { | |
assets: 'assets/**/*', // file paths to be written to assets directory | |
config: 'schema/config/*.json', // file paths to be written to config directory | |
locales: 'schema/locales/*.json', // file paths to be written to locales directory | |
layout: 'views/theme.liquid', // file paths to be written to layout directory | |
sections: 'views/sections/**/*.liquid', // file paths to be written to sections directory | |
metafields: 'metafields/**/*.json', // file paths to be published as global metafields | |
customers: [ // file paths to be written to templates/customers directory | |
'views/templates/customers/*.json', | |
'views/templates/customers/*.liquid' | |
], | |
pages: [ // file paths to be published as pages | |
'pages/*.md', | |
'pages/*.html' | |
], | |
templates: [ // file paths to be written to templates directory | |
'views/templates/*.json', | |
'views/templates/*.liquid' | |
], | |
snippets: [ // file paths to be written to snippets directory | |
'views/snippets', | |
'scripts/vars.js.liquid', | |
'styles/vars.css.liquid' | |
] | |
}, | |
spawns: { // spawned processes to run along side syncify | |
build: { // spawns to run in build mode | |
rollup: 'rollup -c' | |
}, | |
watch: { // spawns to run in watch mode | |
rollup: 'rollup -c -w' | |
} | |
}, | |
stores: [ // list of shopify stores and themes to sync | |
{ | |
domain: 'syncify', // shopify domain | |
themes: { // list of theme targets and their ids to sync | |
dev: 129457717489, | |
prod: 129457717489, | |
stage: 129457717489, | |
test: 129457717489 | |
} | |
}, | |
{ | |
domain: 'boefje', // same as above | |
themes: { | |
dev: 43989205050, | |
prod: 43989205050 | |
} | |
} | |
], | |
transforms: { // transform operations to run when handling input > output | |
json: { // .json file controls | |
spaces: 2, // default spaces for imported JSON files from stores, ie: metafields, locales etc | |
useTabs: false, // whether to use tabs or not | |
exclude: [] // list of paths to exclude | |
}, | |
sections: { // section file handling | |
directoryPrefixing: true, // whether or not to prefix parent directory to section file name | |
onlyPrefixDuplicates: false, // only apply parent directory prefixing on duplicates | |
prefixSeparator: '-', // separator character to use when prefixing | |
excludedFromPrefix: [ // list of directories or files to exclude from prexifing | |
'layout' | |
] | |
}, | |
pages: { // page transfrom controls | |
importType: 'markdown', // how syncify should import pages from store, accepts 'markdown' or 'html' | |
liquidAssetTags: true, // allow Liquid tag asset transforms, eg: {{ 'some-file.jpg' | asset_url }} | |
liquidWarnings: true, // warn if liquid is used in the content (excluding liquidAssetTags) | |
fallbackAuthor: '', // fallback author to use in pages | |
markdown: { // markdown parsing options (passed to marked parser) | |
breaks: true, | |
headerIds: true, | |
headerPrefix: '', | |
mangle: true, | |
silent: true, | |
smartypants: false | |
} | |
}, | |
styles: [ | |
{ | |
input: '', // input path of stylesheets, accepts an array list of globs too. | |
rename: '', // rename option | |
snippet: false, // output as inline snippet, eg: <style></style> | |
postcss: true, // pass to postcss | |
watch: [], // list of stylesheet to watch, | |
sass: { // sass specific options | |
sourcemap: true, | |
style: 'expanded', | |
warnings: false, | |
include: [] | |
} | |
} | |
], | |
icons: { | |
inlineReplacer: true, // allow inline replacements, eg <i name="name-of-icon"></i> into <svg id="name-of-icon"></svg> | |
inlineHTMLTag: 'i', // optional tag to trigger inline replacements, eg: you can use <icon> or whatever | |
vscodeCustomData: true, // provide code completions for icons on inline tag, eg: name="*" will show list of icon names | |
snippets: [ // svg files to be exported as snippets | |
'' | |
], | |
sprites: [ // svg files to be generated as sprite | |
{ | |
input: '', // location of inputs (also accepts array globs) | |
rename: '', | |
snippet: true, // export as snippet, if false exports to assets directory | |
inline: true, // allow inline replacements, eg: <i name="name-of-icon" from="sprite-id"></i> | |
options: { // options passed to svgo | |
dimensionAttributes: true, | |
namespaceClassnames: true, | |
namespaceIDS: false, | |
rootAttributes: { | |
id: 'sprite-id' // this is required if inline is true | |
} | |
} | |
} | |
] | |
} | |
}, | |
minify: { | |
minifyCSS: true, // minify <style> | |
minifyJS: true, // minify <script> | |
collapseWhitespace: true, | |
continueOnParseError: true, | |
removeComments: true, | |
removeLiquidComments: true, // remove liquid comments | |
removeSchemaRefs: true, // remove $schema JSON specification references from JSON (if any) | |
trimCustomFragments: true, | |
ignoreCustomFragments: [], | |
minifySectionSchema: true, // minify section schema | |
collapseInfusedCSS: true, // collapse CSS with Liquid in it | |
stripInnerTagWhitespace: false, // strip liquid tag whitspace, eg: {{ tag }} > {{tag}} or {% if x == y %} > {%if x==y%} | |
stripAttributeValuesNewlines: true, // strip HTML attribute values that contain newlines | |
stripRedundantWhitespaceDashes: true, // remove redundant whitespace trims after minification, eg: {{-tag-}} > {{tag}} | |
ignoredLiquidTags: [], // list of liquid tags to ignore | |
ignoredLiquidObjects: [], // list of liquid objects to ignore | |
excludedFiles: [] // list of files to exclude | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment