I am using this boilerplate for my workspace. When I compile my workspace into my dist folder, everything from my pages directory is copied except for the folder structure.
This is how the structure of the folder actually looks.
This is how it's supposed to be.
BTDT and I2PTGH is supposed to be inside the 2019-midterm folder but for some reason when it's compiled the directory structure of templates/pages is not retained. How can I make it so it so my folder structure is copied from templates/pages?
My gulpfile.js
What do I have to do to achieve what I want?
Related
Please, help me understand, how to deal with such issue:
I use vue-cli and I want to build in dev mode some js file and then be able to access it by url like: http://localhost:8080/my-file.js
But by default, I can't do it in such way. As I understand, I have to override devServer option?
You can put the JS files you want to include in a root folder called /public/ and when yarn build runs (or npm build if you're using that) it will output them exactly as they are in public to the dist folder for reference like you're looking for.
Note that the public folder needs to be at the same level as your src folder - not inside the src folder.
Source: https://cli.vuejs.org/guide/html-and-static-assets.html#preload
Here is the structure of files in my vsts project:
$/intra
-BuildProcess Tempalates
-intra-DEV
-Project
-Solution-1
-Solution-2
-intra-QA
-intra-PROD
I have defined the build configuration for the infra-DEV branch and then building the solution via MSBuild. And on the xext step i am trying to copy the build'ed files from $(Build.SourcesDirectory) to $(build.artifactstagingdirectory).
Here, when i use "" in the 'contents' section, it will copy the below folders and the files in it
-$/intra
-BuildProcess Tempalates
-intra-DEV
but how can i copy only the -intra-DEV folder and the contents inside it.
So i have built my own module and am trying to make a gulp task to copy the folder into my build folder. When this happens, nothing inside the folder is created in my build folder, it is just an empty folder.
My gulp task:
gulp.task("MyModule", function() {
return gulp.src("MyModule")
.pipe(chmod(777))
.pipe(gulp.dest(paths.build.node_modules));
});
paths.build.node_modules resolves to: build/node_modules
MyModule is in the root of the application folder.
Any reason why it would just be copying the folder and nothing inside of it?
You're not instructing it to copy the contents of the folder.
try gulp.src(["MyModule", "MyModule/**/*"], base:{'.'}) to copy the folder and everything in it instead of just the folder.
I have a gulp script that watches for code changes in all javascript files. It looks like this:
gulp.watch(['./**/*.jsx', './**/*.js'], ['build:react']);
So, it watches for all .js and .jsx files from root directory, but I want to ignore node_modules directory.
How can I do that ?
You ca use gulp unwatch This removes the folder specified from your pipe. However, it's generally a good idea to have a source folder that gulp watches instead of the project root folder (then the .git directory and all sorts will be caught up in your task.
I have the following directory structure in one of my projects:
/web
/bower_components
/bootstrap
/jquery
/typeahead.js
/views
/index.jade
I'm trying to use these components from my index.jade file in the following way:
link(src='../bower_components/bootstrap/dist/css/bootstrap.min.css', rel='stylesheet')
script(src='../bower_components/jquery/dist/jquery.min.js')
script(src='../bower_components/typeahead.js/dist/typeahead.bundle.min.js')
but it doesn't work (there's no bootstrap-related styles on this page and jQuery code doesn't work).
Why? What am I doing wrong? How can I fix it?
Should I refer to these components in a different way?
Should I place bower_components directory in another folder?
You probably need to change the file path to be relative to where you are compiling the jade file to.
For example, if you render the jade like this:
/web
/index.html
the source paths would be
link(src='bower_components/bootstrap/dist/css/bootstrap.min.css', rel='stylesheet')
script(src='bower_components/jquery/dist/jquery.min.js')
script(src='bower_components/typeahead.js/dist/typeahead.bundle.min.js')