Lightweight CSS Framework for Building Apps and Websites https://crispy-css.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123 lines
5.4 KiB

4 years ago
6 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
4 years ago
6 years ago
  1. const mix = require('laravel-mix');
  2. const SvgSpritemapPlugin = require('svg-spritemap-webpack-plugin');
  3. const HtmlWebpackPlugin = require('html-webpack-plugin');
  4. const fs = require('fs');
  5. /*
  6. |--------------------------------------------------------------------------
  7. | Mix Asset Management
  8. |--------------------------------------------------------------------------
  9. |
  10. | Mix provides a clean, fluent API for defining some Webpack build steps
  11. | for your Laravel application. By default, we are compiling the Sass
  12. | file for your application, as well as bundling up your JS files.
  13. |
  14. */
  15. mix.webpackConfig({
  16. plugins: [
  17. new SvgSpritemapPlugin('assets/svg/*.svg', {
  18. output: {
  19. filename: 'dist/example/symbol-defs.svg'
  20. },
  21. sprite: {
  22. prefix: 'icon-'
  23. }
  24. }),
  25. new HtmlWebpackPlugin({
  26. filename: 'dist/example/index.html',
  27. template: 'src/html/index.html.ejs',
  28. title: 'Crispy CSS | Lightweight CSS Framework for Building Apps and Websites',
  29. description: 'Lightweight Framework for building fast and clean Websites and Apps for Mobile, Tablet and Desktop. Minimal UI-Elements, Functions and Helpers',
  30. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  31. inject: false
  32. }),
  33. new HtmlWebpackPlugin({
  34. filename: 'dist/example/getting-started.html',
  35. template: 'src/html/page.html.ejs',
  36. title: 'Getting started!',
  37. description: 'Start with Crispy CSS, here you find Variables to configure all values. There is also a short overview for the examples.',
  38. body: fs.readFileSync(__dirname + '/src/html/partials/getting-started.html'),
  39. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  40. inject: false
  41. }),
  42. new HtmlWebpackPlugin({
  43. filename: 'dist/example/core.html',
  44. template: 'src/html/page.html.ejs',
  45. title: 'Core',
  46. description: 'The Core have the basic Styles for Typography, Heading and also Normalize.',
  47. body: fs.readFileSync(__dirname + '/src/html/partials/core.html'),
  48. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  49. inject: false
  50. }),
  51. new HtmlWebpackPlugin({
  52. filename: 'dist/example/components.html',
  53. template: 'src/html/page.html.ejs',
  54. title: 'Components',
  55. description: 'Components are optional, the have a basic build and should be extended.',
  56. body: fs.readFileSync(__dirname + '/src/html/partials/components.html'),
  57. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  58. inject: false
  59. }),
  60. new HtmlWebpackPlugin({
  61. filename: 'dist/example/helpers.html',
  62. template: 'src/html/page.html.ejs',
  63. title: 'Helpers',
  64. description: 'CSS-Classes that can be use to override other Styles, also used if there is no need to style the element.',
  65. body: fs.readFileSync(__dirname + '/src/html/partials/helpers.html'),
  66. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  67. inject: false
  68. }),
  69. new HtmlWebpackPlugin({
  70. filename: 'dist/example/mixins.html',
  71. template: 'src/html/page.html.ejs',
  72. title: 'Mixins',
  73. description: 'Most Mixins will be used to handle Breakpoints and add Styles.',
  74. body: fs.readFileSync(__dirname + '/src/html/partials/mixins.html'),
  75. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  76. inject: false
  77. }),
  78. new HtmlWebpackPlugin({
  79. filename: 'dist/example/functions.html',
  80. template: 'src/html/page.html.ejs',
  81. title: 'Functions',
  82. description: 'Functions helps to handle variables.',
  83. body: fs.readFileSync(__dirname + '/src/html/partials/functions.html'),
  84. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  85. inject: false
  86. }),
  87. new HtmlWebpackPlugin({
  88. filename: 'dist/example/imprint.html',
  89. template: 'src/html/page.html.ejs',
  90. title: 'Imprint',
  91. body: fs.readFileSync(__dirname + '/src/html/partials/imprint.html'),
  92. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  93. inject: false
  94. }),
  95. new HtmlWebpackPlugin({
  96. filename: 'dist/example/privacy-policy.html',
  97. template: 'src/html/page.html.ejs',
  98. title: 'Privacy Policy',
  99. body: fs.readFileSync(__dirname + '/src/html/partials/privacy-policy.html'),
  100. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  101. inject: false
  102. })
  103. ]
  104. });
  105. mix.sass('src/crispy-all.scss', 'dist/crispy-all.css')
  106. .sass('src/crispy-minimal.scss', 'dist/crispy-minimal.css')
  107. .sass('src/example/styles.scss', 'dist/example/styles.css', {
  108. sassOptions: {
  109. includePaths: [
  110. 'node_modules/reflex-grid/scss'
  111. ]
  112. }
  113. })
  114. .js('src/example/js/script.js', 'dist/example/script.js')
  115. .options({
  116. postCss: [
  117. require('postcss-css-variables')()
  118. ]
  119. });