question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

build:css and build:js not working

See original GitHub issue

I am trying to concatenate my js and css files but it is not working

my gulpfile.js

gulp.task(‘useref’, function (done) { gulp.src(‘./www/templates/*/.html’) .pipe(useref()) .pipe(gulp.dest(‘./www/dist’)) .on(‘end’, done); });

my index.html

<head> <meta http-equiv="Content-Security-Policy"> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <title></title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">

<!-- build:css dist_css/styles.css -->
<link href="css/font-awesome.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/select.css" rel="stylesheet">
<link href="css/ionic.app.css" rel="stylesheet">
<link href="css/selectize.css" rel="stylesheet">
<!-- endbuild -->
<link href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet"/>
<link href='https://fonts.googleapis.com/css?family=RobotoDraft:400,500,700,400italic' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="lib/ionic-material/dist/ionic.material.min.css" rel="stylesheet">
<link href="lib/ion-autocomplete/dist/ion-autocomplete.css" rel="stylesheet">
<link href="lib/ionic-toast/src/style.css" rel="stylesheet">

<!-- <link href="lib/ui-select/dist/select.css" rel="stylesheet"> -->
<!-- <link href ="lib/select2/select2.css" rel="stylesheet"> -->

<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->


<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="lib/angular-mocks/angular-mocks.js"></script>
<script src="lib/angular-http-auth/src/http-auth-interceptor.js"></script>
<script src="lib/angular-ui-router/release/angular-ui-router.js"></script>
<script src="lib/ui-select/dist/select.js"></script>
<script src="lib/ion-autocomplete/dist/ion-autocomplete.js"></script>
<script src="lib/angular_ios9_patch/angular-ios9-uiwebview.patch.js"></script>
<script src="lib/ionic-material/dist/ionic.material.min.js"></script>
<script src="lib/angular-filters/dist/angular-filters.js"></script>
<script src="lib/angular-messages/angular-messages.js"></script>
<script src="lib/ng-file-upload/ng-file-upload.min.js"></script>
<script src="lib/ionic-toast/dist/ionic-toast.bundle.min.js"></script>
<script src="lib/ngstorage/ngStorage.min.js"></script>

<!-- cordova script (this will be a 404 during development) -->
<script src="lib/ngCordova/dist/ng-cordova.min.js"></script>
<script src="cordova.js"></script>

<!-- build:js dist_js/app.js -->
<script src="dist/dist_js/app/app.js"></script>
<script src="dist/dist_js/app/routes.js"></script>
<script src="dist/dist_js/app/controllers/controllers.js"></script>
<script src="dist/dist_js/app/services/services.js"></script>
<script src="dist/dist_js/app/AppSettings.js"></script>
<script src="dist/dist_js/app/directives/directives.js"></script>
<script src="dist/dist_js/app/services/app_start_services.js"></script>
<script src="dist/dist_js/app/services/authentication_services.js"></script>
<script src="dist/dist_js/app/services/common_services.js"></script>
<script src="dist/dist_js/app/services/create_cases_services.js"></script>
<script src="dist/dist_js/app/services/referral_case_services.js"></script>
<script src="dist/dist_js/app/services/tokens_services.js"></script>
<script src="dist/dist_js/app/services/register_users_services.js"></script>
<script src="dist/dist_js/app/services/save_local_db_services.js"></script>
<script src="dist/dist_js/app/controllers/app_controller.js"></script>
<script src="dist/dist_js/app/controllers/main_controller.js"></script>
<script src="dist/dist_js/app/controllers/new_cases_controller.js"></script>
<script src="dist/dist_js/app/controllers/referral_controller.js"></script>
<!-- endbuild -->

<!-- build:js dist_js/templates.js -->
    <script src="dist/dist_js/app/templates.js"></script>
    <!-- endbuild -->
</head>

why doesnt it create the new file styles.css and app.js in the respective folders?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
boyfunkycommented, Jan 14, 2016

@jonkemp sorry found out wht my issue was nd solved it. I missed some steps tht was causin the error.

0reactions
levyadamscommented, May 18, 2018

Hey thanks for telling us what your issue was so other people could maybe use this as a resource! Nice work bro!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Various Yarn issues when running build:js or build:css - Drupal
With a clean installation there are missing packages for running yarn run build:js : /bin/sh: cross-env: command not found
Read more >
Grunt build does not create css files - Stack Overflow
What solved the problem in my case: Name your file with SCSS extension, as the main.scss file, e.g. custom.scss located into <%= yeoman.app...
Read more >
How to Build a CSS Library with Vite.js - freeCodeCamp
Below is a summary of what we'll build: Create a library build with Vite, not a web app build; Handle static assets used...
Read more >
Using Npm Scripts as a Build Tool in 2022 - Delicious Brains
This can lead to problems like: ... "build:img": "npm run squoosh", "build": "npm run build:css && npm run build:js && npm run build:img"...
Read more >
RequireJS Optimizer
npm install -g requirejs > r.js -o app.build.js ... This would not work: paths.core/jquery.tabs=empty: , since it would result in this incorrect structure:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found