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.

133 lines
6.0 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
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/recipes/modern-386/index.html',
  27. template: 'src/html/recipes/modern-386/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/index.html',
  35. template: 'src/html/index.html.ejs',
  36. title: 'Crispy CSS | Lightweight CSS Framework for Building Apps and Websites',
  37. description: 'Lightweight Framework for building fast and clean Websites and Apps for Mobile, Tablet and Desktop. Minimal UI-Elements, Functions and Helpers',
  38. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  39. inject: false
  40. }),
  41. new HtmlWebpackPlugin({
  42. filename: 'dist/example/getting-started.html',
  43. template: 'src/html/page.html.ejs',
  44. title: 'Getting started!',
  45. description: 'Start with Crispy CSS, here you find Variables to configure all values. There is also a short overview for the examples.',
  46. body: fs.readFileSync(__dirname + '/src/html/partials/getting-started.html'),
  47. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  48. inject: false
  49. }),
  50. new HtmlWebpackPlugin({
  51. filename: 'dist/example/core.html',
  52. template: 'src/html/page.html.ejs',
  53. title: 'Core',
  54. description: 'The Core have the basic Styles for Typography, Heading and also Normalize.',
  55. body: fs.readFileSync(__dirname + '/src/html/partials/core.html'),
  56. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  57. inject: false
  58. }),
  59. new HtmlWebpackPlugin({
  60. filename: 'dist/example/components.html',
  61. template: 'src/html/page.html.ejs',
  62. title: 'Components',
  63. description: 'Components are optional, the have a basic build and should be extended.',
  64. body: fs.readFileSync(__dirname + '/src/html/partials/components.html'),
  65. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  66. inject: false
  67. }),
  68. new HtmlWebpackPlugin({
  69. filename: 'dist/example/helpers.html',
  70. template: 'src/html/page.html.ejs',
  71. title: 'Helpers',
  72. description: 'CSS-Classes that can be use to override other Styles, also used if there is no need to style the element.',
  73. body: fs.readFileSync(__dirname + '/src/html/partials/helpers.html'),
  74. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  75. inject: false
  76. }),
  77. new HtmlWebpackPlugin({
  78. filename: 'dist/example/mixins.html',
  79. template: 'src/html/page.html.ejs',
  80. title: 'Mixins',
  81. description: 'Most Mixins will be used to handle Breakpoints and add Styles.',
  82. body: fs.readFileSync(__dirname + '/src/html/partials/mixins.html'),
  83. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  84. inject: false
  85. }),
  86. new HtmlWebpackPlugin({
  87. filename: 'dist/example/functions.html',
  88. template: 'src/html/page.html.ejs',
  89. title: 'Functions',
  90. description: 'Functions helps to handle variables.',
  91. body: fs.readFileSync(__dirname + '/src/html/partials/functions.html'),
  92. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  93. inject: false
  94. }),
  95. new HtmlWebpackPlugin({
  96. filename: 'dist/example/imprint.html',
  97. template: 'src/html/page.html.ejs',
  98. title: 'Imprint',
  99. body: fs.readFileSync(__dirname + '/src/html/partials/imprint.html'),
  100. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  101. inject: false
  102. }),
  103. new HtmlWebpackPlugin({
  104. filename: 'dist/example/privacy-policy.html',
  105. template: 'src/html/page.html.ejs',
  106. title: 'Privacy Policy',
  107. body: fs.readFileSync(__dirname + '/src/html/partials/privacy-policy.html'),
  108. footer: fs.readFileSync(__dirname + '/src/html/partials/footer.html'),
  109. inject: false
  110. })
  111. ]
  112. });
  113. mix.sass('src/crispy-all.scss', 'dist/crispy-all.css')
  114. .sass('src/crispy-minimal.scss', 'dist/crispy-minimal.css')
  115. .sass('recipes/modern-386/modern-386.scss', 'dist/recipes/modern-386/modern-386.css')
  116. .sass('example/styles.scss', 'dist/example/styles.css', {
  117. sassOptions: {
  118. includePaths: [
  119. 'node_modules/reflex-grid/scss'
  120. ]
  121. }
  122. })
  123. .copy('fonts/*', 'dist/recipes/modern-386/fonts')
  124. .js('example/js/script.js', 'dist/example/script.js')
  125. .options({
  126. postCss: [
  127. require('postcss-css-variables')()
  128. ]
  129. });