sc-npm-packages - @sxa/theme 10.3.0
> npm install @sxa/theme@10.3.0
Boilerplate for creating a new theme for your Sitecore site.
For this version of the theme we recommend to use @sxa/cli rather than gulp tasks
Prerequisites
- Should be installed @sxa/cli globally.
For using Autosynchronizer, you need to complete next steps:
Download the theme boilerplate;
Open PathToInstance/Website/App_Config/Include/z.Feature.Overrides (in previous version of Sitecore it can be PathToInstance/Website/App_Config/Include/Feature) folder and remove .disabled from z.SPE.Sync.Enabler.Gulp.config.disabled file;
Switch to the downloaded theme boilerplate folder.
run
sxa init
Update the config file for Gulp tasks. ThemeRoot/gulp/config.js file:
serverOptions.server
- path to sitecore instance. Exampleserver: 'http://sxa'
;
If you use Creative exchange skip this step. Open ThemeRoot/gulp/serverConfig.json
serverOptions.projectPath
- path to project, where the theme is placed. ExampleprojectPath: '/themes'
;serverOptions.themePath
- path to basic theme folder from the project root. ExamplethemePath: '/Basic2'
;
Open the Theme root folder with the command line.
Run
npm install
(*node.js and npm should be installed already *);If gulp is not yet installed - Install gulp using following command:
npm install --global gulp-cli
Run the gulp task that you need:
Global tasks:gulp default
or justgulp
- startsgulp watchAll
;gulp watchAll
- aggregates the functionality of the following tasks:
watchSass
watchJS
watchEs
watchCss
watchImg
watchSassSource
watchScriban
watchHtml
gulp buildAll
- compiles sass, minifies css and js;gulp uploadAll
- uploading JavaScript, CSS, and images to the Sitecore instance;gulp rebuildAll
- compiles sass components into css, minifies js and css, uploads js, css, images;gulp rebuildMain
- compiles sass components into css, minifies js and css, uploads js, css;
For SASS
gulp watchSass
- aggregates the functionality of the following tasks:
watchSassComponents
watchSassBase
watchSassStyles
watchSassDependency
gulp buildSass
- compiles sass into css from root of sass folder;gulp buildSassStyles
- compiles files from sass/styles/common , sass/styles/content-alignment , sass/styles/layout to styles/styles.css;gulp watchSassStyles
- monitors changes under sass/styles/common , sass/styles/content-alignment , sass/styles/layout folders, compiles all of them to styles/styles.css;gulp watchSassBase
- monitors changes under sass/abstracts/, sass/base/ , sass/components folders and compiles components and styles;gulp watchSassComponents
- monitors changes in component styles under sass folder and compiles them to styles folder;gulp watchSassDependency
- monitors changes under sass/styles/ (except for sass/styles/common , sass/styles/content-alignment , sass/styles/layout) and compiles appropriate components;gulp watchSassSource
- monitors changed under sass/* folder and uploads changed file to the Sitecore instance;
For CSS
gulp watchCss
- monitors changes of css files under styles folder and uploads them to the Sitecore instance;gulp buildCss
- bundles and minifies files in styles folder;gulp uploadCss
- uploading CSS files from styles folder based on the theme configuration.
For JavaScript:
gulp buildEslint
run eslint for all JavaScript in the Scripts folder;gulp watchJs
- watches changes of js files under Scripts folder and upload them to the Sitecore instance;gulp watchEs
- watches changes of ES6+ js files under sources folder and upload them to the Sitecore instance;gulp buildJs
- bundles and minifies JavaScript files in the Scripts folder;gulp uploadJs
- uploads JavaScript files from Scripts folder based on the theme configuration
For SASS and CSS
gulp buildStyles
- compiles sass components into css, bundles and minfies css files;
For Images
gulp watchImg
- monitors changes under images folder and uploads the files to the Sitecore instance;gulp uploadImg
- upload files from images to the Sitecore instance;
For Sprite
gulp buildSpriteFlag
- create sprites for icons from flags folder;
For Fonts
gulp uploadFonts
- upload files from Fonts folder to the Sitecore instance;
For Gulp config
gulp uploadGulpConfig
- upload files from config folder and gulpfile.js to the Sitecore instance;
Creative Exchange specific tasks
For Scriban
gulp watchScriban
- monitors changes of Scriban files and uploads them to the Sitecore instance;
For HTML
gulp watchHtml
- monitors changes of HTML files and uploads them to the Sitecore instance to be parsed by Creative Exchange;
When watcher starts you must enter your login and password for Sitecore, for uploading reason.
Owners |
|
AuthorsSitecore Corporation A/S |
|
Project URLhttps://doc.sitecore.com/xp/en/developers/sxa/103/sitecore-experience-accelerator/modify-your-site-design-with-creative-exchange-live.html |
|
Licensehttps://doc.sitecore.net/~/media/C23E989268EC4FA588108F839675A5B6.pdf |
|
KeywordsSXA, Creative Exchange Live, Sitecore Experience Accelerator, Gulp, Theme, dist-tag:latest |
|
Info57350 total downloads |
|
23015 downloads for version 10.3.0 | |
Download (1.04 MB) | |
Dependencies@babel/polyfill@^7.8.7, gulp@^4.0.2, gulp-autoprefixer@^8.0.0, gulp-babel@^8.0.0, gulp-cli@^2.2.0, gulp-concat@^2.6.1, gulp-eslint@^6.0.0, gulp-filter@^7.0.0, gulp-if@^3.0.0, gulp-prompt@^1.2.0, gulp-rename@^2.0.0, gulp-sass@^5.0.0, gulp-sass-bulk-import@^1.0.1, gulp-sass-grapher@^1.0.0, gulp-sourcemaps@^3.0.0, gulp-upload@^1.0.0, gulp-watch@^5.0.1, gulp.spritesmith@^6.11.0, inquirer@^8.2.2, jsdoc@^3.6.3, node-sass@^7.0.1, path@^0.12.7, rimraf@^3.0.2 |
|
Dependencies (dev)@babel/cli@^7.8.4, @babel/core@^7.9.0, @babel/plugin-transform-runtime@^7.10.1, @babel/preset-env@^7.9.0, @babel/register@^7.9.0, @sxa/celt@^10.3.0, eslint@^8.14.0, gulp-tap@^2.0.0 |
Package history
Version | Size | Last updated | Downloads | Mirrored? | |||
---|---|---|---|---|---|---|---|
10.3.0 | 1.04 MB | Tue, 07 Feb 2023 09:28:35 GMT | 23015 | ||||
10.2.3 | 1.04 MB | Tue, 07 Feb 2023 09:18:39 GMT | 7 | ||||
10.2.2 | 1.04 MB | Thu, 18 Nov 2021 09:39:41 GMT | 17759 | ||||
10.2.1 | 1.04 MB | Tue, 09 Nov 2021 15:06:28 GMT | 899 | ||||
10.2.0 | 1.04 MB | Fri, 05 Nov 2021 15:34:56 GMT | 123 | ||||
10.1.0 | 1.04 MB | Thu, 25 Feb 2021 13:10:19 GMT | 10005 | ||||
10.0.0 | 1.05 MB | Tue, 04 Aug 2020 13:48:53 GMT | 2708 | ||||
1.0.1 | 1.05 MB | Thu, 28 Nov 2019 14:50:20 GMT | 2834 |