You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[nodejs](https://nodejs.org/en/download/) 6.9+ with npm 3.10+
20
+
21
+
-[gulp (must be installed
22
+
23
+
globally)](https://www.npmjs.com/package/gulp)
24
+
25
+
-[yarn](https://yarnpkg.com/)
26
+
27
+
- SQL Server
22
28
23
29
#### Solution Structure (Layers)
24
30
@@ -1154,18 +1160,13 @@ node\_modules folder will be very big (more than 250 MB) and we don't
1154
1160
want to send all of those files to production when we publish our
1155
1161
application. In order to overcome this, we have used gulp to move
1156
1162
necessary files from **\*.Web.Mvc/node\_modules** to
1157
-
**\*.Web.Mvc/wwwroot/lib**. There are two related files in \*.Web.Mvc
1158
-
project, **bundle.config.js** and **gulpfile.js**. **bundle.config.js**
1159
-
contains necessary mapping definitions from node\_modules to lib folder
1160
-
and it also contains bundling & minification definitions. You can see
1161
-
respectively in below screenshots mapping and bundling/minification
1162
-
configurations from bundle.config.js.
1163
+
**\*.Web.Mvc/wwwroot/lib**. Mapping from node_modules to wwwroot/lib folder is defined in **package-mapping-config.js** file. So, when you add a new package to your solution, you also need to add a mapping to this file defining the files you want to move from node_modules to wwwroot/lib folder for newly added package.
In order to create css and javascript bundles "gulp" command must be runned in the root directory of ***.Web.Mvc** solution using a command prompt. This can be done using Visual Studio's Task Runner Explorer. Default gulp task doesn't end and it watches for changes in the css & javascript files used in **bundle.config.js** file. If ""--prod" argument is not passed to gulp command, css and javascript bundles will not be minified in order to provide developers a better debug experience. Running "**gulp --prod**" command will minify output css and javascript files. For Continuous Integration pipelines "gulp build:prod" command can be used, because this task ends with an exit code so, CI environments can understand.
1169
+
In order to create css and javascript bundles https://www.nuget.org/packages/BundlerMinifier.Core/ package is used. Bundling definitions are stored in **bundleconfig.json** file. If you don't want to modify this file manually, you can use https://marketplace.visualstudio.com/items?itemName=MadsKristensen.BundlerMinifier Visual Studio extension to create bundling definitions for you.
or, we can open a command prompt, navigate to root directory of
106
-
**\*.Web.Mvc** project and run "**gulp**" command (gulp must be
107
-
installed globally for this option)
102
+
**\*.Web.Mvc** project and run "**npm run create-bundles**" command. This command must be runned when a new npm package is added to the solution. Otherwise, you can just build your solution and all bundles will be updated automatically.
108
103
109
104
Now we are ready.. just run your solution. It will open login page of
0 commit comments