mirror of
https://github.com/symfony/recipes.git
synced 2026-09-12 23:56:25 +03:00
111 lines
10 KiB
JSON
111 lines
10 KiB
JSON
{
|
|
"locks": {
|
|
"symfony/webpack-encore-bundle": {
|
|
"version": "1.9",
|
|
"recipe": {
|
|
"repo": "1.9",
|
|
"branch": "master",
|
|
"version": "1.9",
|
|
"ref": "0f274572ea315eb3b5884518a50ca43f211b4534"
|
|
}
|
|
}
|
|
},
|
|
"manifests": {
|
|
"symfony/webpack-encore-bundle": {
|
|
"repository": "github.com/symfony/recipes",
|
|
"package": "symfony/webpack-encore-bundle",
|
|
"version": "1.9",
|
|
"manifest": {
|
|
"bundles": {
|
|
"Symfony\\WebpackEncoreBundle\\WebpackEncoreBundle": [
|
|
"all"
|
|
]
|
|
},
|
|
"copy-from-recipe": {
|
|
"assets/": "assets/",
|
|
"config/": "%CONFIG_DIR%/",
|
|
"package.json": "package.json",
|
|
"webpack.config.js": "webpack.config.js"
|
|
},
|
|
"aliases": [
|
|
"ux",
|
|
"encore",
|
|
"webpack",
|
|
"webpack-encore"
|
|
],
|
|
"gitignore": [
|
|
"/node_modules/",
|
|
"/%PUBLIC_DIR%/build/",
|
|
"npm-debug.log",
|
|
"yarn-error.log"
|
|
],
|
|
"post-install-output": [
|
|
" * Install Yarn and run <fg=green>yarn install</>",
|
|
"",
|
|
" * Uncomment the Twig helpers in <fg=green>templates/base.html.twig</>",
|
|
"",
|
|
" * Start the development server: <fg=green>yarn encore dev-server</>"
|
|
]
|
|
},
|
|
"files": {
|
|
"config/packages/webpack_encore.yaml": {
|
|
"contents": "webpack_encore:\n # The path where Encore is building the assets - i.e. Encore.setOutputPath()\n output_path: '%kernel.project_dir%/public/build'\n # If multiple builds are defined (as shown below), you can disable the default build:\n # output_path: false\n\n # Set attributes that will be rendered on all script and link tags\n script_attributes:\n defer: true\n # Uncomment (also under link_attributes) if using Turbo Drive\n # https://turbo.hotwired.dev/handbook/drive#reloading-when-assets-change\n # 'data-turbo-track': reload\n # link_attributes:\n # Uncomment if using Turbo Drive\n # 'data-turbo-track': reload\n\n # If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials')\n # crossorigin: 'anonymous'\n\n # Preload all rendered script and link tags automatically via the HTTP/2 Link header\n # preload: true\n\n # Throw an exception if the entrypoints.json file is missing or an entry is missing from the data\n # strict_mode: false\n\n # If you have multiple builds:\n # builds:\n # pass \"frontend\" as the 3rg arg to the Twig functions\n # {{ encore_entry_script_tags('entry1', null, 'frontend') }}\n\n # frontend: '%kernel.project_dir%/public/frontend/build'\n\n # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)\n # Put in config/packages/prod/webpack_encore.yaml\n # cache: true\n",
|
|
"executable": false,
|
|
"encoding": ""
|
|
},
|
|
"config/packages/prod/webpack_encore.yaml": {
|
|
"contents": "#webpack_encore:\n # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)\n # Available in version 1.2\n #cache: true\n",
|
|
"executable": false,
|
|
"encoding": ""
|
|
},
|
|
"config/packages/test/webpack_encore.yaml": {
|
|
"contents": "#webpack_encore:\n# strict_mode: false\n",
|
|
"executable": false,
|
|
"encoding": ""
|
|
},
|
|
"config/packages/assets.yaml": {
|
|
"contents": "framework:\n assets:\n json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'\n",
|
|
"executable": false,
|
|
"encoding": ""
|
|
},
|
|
"package.json": {
|
|
"contents": "{\n \"devDependencies\": {\n \"@symfony/stimulus-bridge\": \"^2.0.0\",\n \"@symfony/webpack-encore\": \"^1.0.0\",\n \"core-js\": \"^3.0.0\",\n \"regenerator-runtime\": \"^0.13.2\",\n \"stimulus\": \"^2.0.0\",\n \"webpack-notifier\": \"^1.6.0\"\n },\n \"license\": \"UNLICENSED\",\n \"private\": true,\n \"scripts\": {\n \"dev-server\": \"encore dev-server\",\n \"dev\": \"encore dev\",\n \"watch\": \"encore dev --watch\",\n \"build\": \"encore production --progress\"\n }\n}\n",
|
|
"executable": false,
|
|
"encoding": ""
|
|
},
|
|
"assets/bootstrap.js": {
|
|
"contents": "import { startStimulusApp } from '@symfony/stimulus-bridge';\n\n// Registers Stimulus controllers from controllers.json and in the controllers/ directory\nexport const app = startStimulusApp(require.context(\n '@symfony/stimulus-bridge/lazy-controller-loader!./controllers',\n true,\n /\\.(j|t)sx?$/\n));\n\n// register any custom, 3rd party controllers here\n// app.register('some_controller_name', SomeImportedController);\n",
|
|
"executable": false,
|
|
"encoding": ""
|
|
},
|
|
"assets/styles/app.css": {
|
|
"contents": "body {\n background-color: lightgray;\n}\n",
|
|
"executable": false,
|
|
"encoding": ""
|
|
},
|
|
"assets/controllers.json": {
|
|
"contents": "{\n \"controllers\": [],\n \"entrypoints\": []\n}\n",
|
|
"executable": false,
|
|
"encoding": ""
|
|
},
|
|
"assets/controllers/hello_controller.js": {
|
|
"contents": "import { Controller } from 'stimulus';\n\n/*\n * This is an example Stimulus controller!\n *\n * Any element with a data-controller=\"hello\" attribute will cause\n * this controller to be executed. The name \"hello\" comes from the filename:\n * hello_controller.js -> \"hello\"\n *\n * Delete this file or adapt it for your use!\n */\nexport default class extends Controller {\n connect() {\n this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js';\n }\n}\n",
|
|
"executable": false,
|
|
"encoding": ""
|
|
},
|
|
"assets/app.js": {
|
|
"contents": "/*\n * Welcome to your app's main JavaScript file!\n *\n * We recommend including the built version of this JavaScript file\n * (and its CSS file) in your base layout (base.html.twig).\n */\n\n// any CSS you import will output into a single css file (app.css in this case)\nimport './styles/app.css';\n\n// start the Stimulus application\nimport './bootstrap';\n",
|
|
"executable": false,
|
|
"encoding": ""
|
|
},
|
|
"webpack.config.js": {
|
|
"contents": "const Encore = require('@symfony/webpack-encore');\n\n// Manually configure the runtime environment if not already configured yet by the \"encore\" command.\n// It's useful when you use tools that rely on webpack.config.js file.\nif (!Encore.isRuntimeEnvironmentConfigured()) {\n Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');\n}\n\nEncore\n // directory where compiled assets will be stored\n .setOutputPath('public/build/')\n // public path used by the web server to access the output path\n .setPublicPath('/build')\n // only needed for CDN's or sub-directory deploy\n //.setManifestKeyPrefix('build/')\n\n /*\n * ENTRY CONFIG\n *\n * Each entry will result in one JavaScript file (e.g. app.js)\n * and one CSS file (e.g. app.css) if your JavaScript imports CSS.\n */\n .addEntry('app', './assets/app.js')\n\n // enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js)\n .enableStimulusBridge('./assets/controllers.json')\n\n // When enabled, Webpack \"splits\" your files into smaller pieces for greater optimization.\n .splitEntryChunks()\n\n // will require an extra script tag for runtime.js\n // but, you probably want this, unless you're building a single-page app\n .enableSingleRuntimeChunk()\n\n /*\n * FEATURE CONFIG\n *\n * Enable & configure other features below. For a full\n * list of features, see:\n * https://symfony.com/doc/current/frontend.html#adding-more-features\n */\n .cleanupOutputBeforeBuild()\n .enableBuildNotifications()\n .enableSourceMaps(!Encore.isProduction())\n // enables hashed filenames (e.g. app.abc123.css)\n .enableVersioning(Encore.isProduction())\n\n .configureBabel((config) => {\n config.plugins.push('@babel/plugin-proposal-class-properties');\n })\n\n // enables @babel/preset-env polyfills\n .configureBabelPresetEnv((config) => {\n config.useBuiltIns = 'usage';\n config.corejs = 3;\n })\n\n // enables Sass/SCSS support\n //.enableSassLoader()\n\n // uncomment if you use TypeScript\n //.enableTypeScriptLoader()\n\n // uncomment if you use React\n //.enableReactPreset()\n\n // uncomment to get integrity=\"...\" attributes on your script & link tags\n // requires WebpackEncoreBundle 1.4 or higher\n //.enableIntegrityHashes(Encore.isProduction())\n\n // uncomment if you're having problems with a jQuery plugin\n //.autoProvidejQuery()\n;\n\nmodule.exports = Encore.getWebpackConfig();\n",
|
|
"executable": false,
|
|
"encoding": ""
|
|
}
|
|
},
|
|
"origin": "symfony/webpack-encore-bundle:1.9@github.com/symfony/recipes:master",
|
|
"is_contrib": false
|
|
}
|
|
}
|
|
} |