[UPDATE] Readme

This commit is contained in:
Tony Air 2018-04-21 11:11:11 +07:00
parent 8ed450f887
commit f9fd446bf6

View File

@ -10,8 +10,8 @@ Checkout files at /site/ folder for details
+ WebpackTemplateProvider::WebpackJS('file-name') and WebpackTemplateProvider::WebpackCSS('file-name') can be used at php area + WebpackTemplateProvider::WebpackJS('file-name') and WebpackTemplateProvider::WebpackCSS('file-name') can be used at php area
+ All images will be optimised at /site/src/img and will be written to /site/client/img (by default) + All images will be optimised at /site/src/img and will be written to /site/client/img (by default)
+ Favicons will be generated at /site/client/icons using /site/src/favicon.png + Favicons will be generated at /site/client/icons using /site/src/favicon.png
+ Folder /site/src/js/types is used to create page specific JS (just create JS file there and it will be compiled) + Folder /site/client/src/js/types is used to create page specific JS (just create JS file there and it will be compiled)
+ Folder /site/src/scss/types is used to create page specific CSS (just create SCSS file there and it will be compiled) + Folder /site/clent/src/scss/types is used to create page specific CSS (just create SCSS file there and it will be compiled)
+ Automatic linting (JS+SCSS) + Automatic linting (JS+SCSS)
+ Bootstrap 4 included by default + Bootstrap 4 included by default
+ Font-Awesome included by default + Font-Awesome included by default
@ -21,30 +21,31 @@ Checkout files at /site/ folder for details
### Folder structure: ### Folder structure:
+ /site/_config/webpack.yml (Webpack configurtion) + /site/_config/webpack.yml (Webpack configurtion)
+ /site/code/WebpackTemplateProvider.php (WebpackJS and WebpackCSS functionality) + /site/src/WebpackTemplateProvider.php (WebpackJS and WebpackCSS functionality)
+ /site/code/DeferedRequirements.php (Deferred Requirements + Requirements auto-loader) + /site/src/DeferedRequirements.php (Deferred Requirements + Requirements auto-loader)
+ /site/templates/Page.ss (An example Page.ss) + /site/templates/Page.ss (An example of Page.ss)
+ /site/src (Your sources) + /site/src (Your backend sources)
+ /site/client (Your production assets) + /site/client/src (Your frontend sources)
+ /site/client/dist (Your compiled-production assets)
+ /site/src/js (Your JS-scripts) + /site/client/src/js (Your JS-scripts)
+ /site/src/js/_components (Your JS components to be included) + /site/client/src/js/_components (Your JS components to be included)
+ /site/src/js/_components/_spinner.js (An example to display and hide loading spinner) + /site/client/src/js/_components/_spinner.js (An example to display and hide loading spinner)
+ /site/src/js/app.js (main application file to include website-wide components) + /site/client/src/js/app.js (main application file to include website-wide components)
+ /site/src/js/main.js (Your custom site-wide functionality) + /site/client/src/js/main.js (Your custom site-wide functionality)
+ /site/src/js/_events.js (Your custom site-wide events) + /site/client/src/js/_events.js (Your custom site-wide events)
+ /site/src/js/_pageType_and_component_template.js (A template which can be used to create new modules) + /site/client/src/js/_pageType_and_component_template.js (A template which can be used to create new modules)
+ /site/src/types/*.js (Extra page-specific modules to be auto-compiled. My suggestion is to use *ClassName*.js and then require it at SilverStripe custom controller area) + /site/client/src/types/*.js (Extra page-specific modules to be auto-compiled. My suggestion is to use *ClassName*.js and then require it at SilverStripe custom controller area)
+ /site/src/scss (Your styling to be compiled) + /site/clent/src/scss (Your styling to be compiled)
+ /site/src/scss/_components (Your custom SCSS components) + /site/clent/src/scss/_components (Your custom SCSS components)
+ /site/src/scss/app.scss (main application file to include site-wide components) + /site/clent/src/scss/app.scss (main application file to include site-wide components)
+ /site/src/scss/_variables.sccs (your custom variables, ex. bootstrap) + /site/clent/src/scss/_variables.sccs (your custom variables, ex. bootstrap)
+ /site/src/scss/_layout.sccs (Your site-wide styling) + /site/clent/src/scss/_layout.sccs (Your site-wide styling)
### Requirements: ### Requirements: