{"id":22293721,"url":"https://github.com/andrewhaine/silverstripe-webpack-theme","last_synced_at":"2025-07-29T01:30:56.296Z","repository":{"id":62485851,"uuid":"96583075","full_name":"AndrewHaine/silverstripe-webpack-theme","owner":"AndrewHaine","description":"Base theme for SilverStripe using using webpack as a build system","archived":false,"fork":false,"pushed_at":"2019-01-30T21:22:33.000Z","size":641,"stargazers_count":8,"open_issues_count":3,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-08T14:04:18.538Z","etag":null,"topics":["silverstripe","theme","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndrewHaine.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-07T23:17:28.000Z","updated_at":"2021-05-14T23:48:01.000Z","dependencies_parsed_at":"2022-11-02T10:00:50.823Z","dependency_job_id":null,"html_url":"https://github.com/AndrewHaine/silverstripe-webpack-theme","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/AndrewHaine/silverstripe-webpack-theme","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewHaine%2Fsilverstripe-webpack-theme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewHaine%2Fsilverstripe-webpack-theme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewHaine%2Fsilverstripe-webpack-theme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewHaine%2Fsilverstripe-webpack-theme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewHaine","download_url":"https://codeload.github.com/AndrewHaine/silverstripe-webpack-theme/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewHaine%2Fsilverstripe-webpack-theme/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267616529,"owners_count":24116149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["silverstripe","theme","webpack"],"created_at":"2024-12-03T17:30:45.577Z","updated_at":"2025-07-29T01:30:55.963Z","avatar_url":"https://github.com/AndrewHaine.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Base SilverStripe theme with a webpack build system\n\n## Installation\n\n### Composer\nThis theme can be installed through composer, simply add the following line to your project's composer.json file.\n```\nrequire: \"andrewhaine/silverstripe-webpack-theme\": \"~2.0\"\n```\n\n**If you are installing with composer it is advisable to remove the above option from your composer.json file after the initial installation in order to avoid installing duplicate themes or overriding your changes.**\n\n### Manual Installation\nCopy this theme into a subdirectory of your themes folder.\n\n## Usage\nThis theme is designed to optimise your production build by minifying assets and optimising images. Any assets referenced (explicitly or implicitly) in index.js will be compiled.\n\n### CSS\nThis theme supports both SCSS and Sass syntax.\n\nThe recommended entry point for all CSS is sass/style.sass, any files imported will be bundled into a single CSS file which can be included in the way you choose (Requirements API, link tag etc..).\n\nThe setup will also produce an editor.css file which is used by SilverStripe to style the TinyMCE fields in the CMS, styles imported into sass/editor.sass will be included in this file.\n\n#### Linting\nLinting is available from stylelint for SCSS and Sass files, the rules for the linter can be updated in .stylelintrc.yml. A full list of rules can be found [here](https://stylelint.io/user-guide/rules/).\n\n### JavaScript\nJavascript is included in the bundle in much the same way as CSS, the entry point for javascript in this theme is javascript/src/main.js.\n\nThe theme comes set up for development using ES6 Syntax but this can be adjusted accordingly by installing babel presets and changing the settings in .eslintrc.yml.\n\n### Images\nAny images imported into the bundle, either directly or through a URL reference will be optimised, where possible files will be inlined using Data URIs, if an image is above 10kb it will be compressed using the image-webpack-loader and placed in the images directory (Names and extensions are preserved). Images need to be placed in the 'images' directory.\n\nBy default image compression is disabled for performance purposes - when the time comes to bundle images for production this can be re-enabled with the `disable` option in `webpack.common.babel.js`.\n\n### Development\nIn order to use the watch task you will need to tell webpack which url it should proxy when creating the development server - this is the development url you are using for your project. This option can be set in `variables.js`.\n\nThe build system uses webpack dev server which allows hot reloading for speedy testing. To start the server run `npm run watch`. The server will start on port 3000 you will also get a nice terminal interface courtesy of [FormidableLabs](https://github.com/FormidableLabs/webpack-dashboard).\n\nWith the server started you should then see your site updating live on localhost:3000 when any asset files are changed.\n\nOnce development is complete eject your css and minify the bundle using `npm run build`. This will create the main CSS file (css/main.css) and your JS bundle (javascript/dist/main.bundle.js) which can then be included in your templates.\n\n## Signature\nThe system gives the ability to add a signature to the top of your css and js files, to edit the information shown or disable this feature, edit the options in `variables.js`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewhaine%2Fsilverstripe-webpack-theme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewhaine%2Fsilverstripe-webpack-theme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewhaine%2Fsilverstripe-webpack-theme/lists"}