Sha256: 9fbbf16f8859a2f8acdf72b9f371980b485b6fad7a65352d1161692675dac2d6

Contents?: true

Size: 654 Bytes

Versions: 15

Compression:

Stored size: 654 Bytes

Contents

const esbuild = require('esbuild')
const sassPlugin = require('esbuild-sass-plugin').sassPlugin
const watch = process.argv.includes('-w')

// Used to skip external URLs in scss files
const externalUrlPlugin = {
  name: 'custom-resolver',
  setup (build) {
    build.onResolve({ filter: /^https?:\/\// }, ({ path }) => {
      return { path, external: true, namespace: 'provided' }
    })
  }
}

esbuild.build({
  entryPoints: ['src/scss/formstrap.scss'],
  outfile: 'app/assets/stylesheets/formstrap.css',
  bundle: true,
  watch,
  allowOverwrite: true,
  plugins: [
    externalUrlPlugin,
    sassPlugin()
  ]
}).catch((e) => console.error(e.message))

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
formstrap-0.4.5 esbuild-css.js
formstrap-0.4.4 esbuild-css.js
formstrap-0.4.3 esbuild-css.js
formstrap-0.4.2 esbuild-css.js
formstrap-0.3.5 esbuild-css.js
formstrap-0.3.4 esbuild-css.js
formstrap-0.3.3 esbuild-css.js
formstrap-0.3.2 esbuild-css.js
formstrap-0.3.1 esbuild-css.js
formstrap-0.3.0 esbuild-css.js
formstrap-0.2.1 esbuild-css.js
formstrap-0.2.0 esbuild-css.js
formstrap-0.1.3 esbuild-css.js
formstrap-0.1.2 esbuild-css.js
formstrap-0.1.1 esbuild-css.js