GithubHelp home page GithubHelp logo

Comments (16)

amobrem avatar amobrem commented on June 13, 2024

I think this can be fixed by using ngmin?

from mean.

amoshaviv avatar amoshaviv commented on June 13, 2024

Did you make sure to build your files into the minified versions using grunt build?

from mean.

darksniper87 avatar darksniper87 commented on June 13, 2024

It's the same issue that I have. For some reason the grunt task for minifying the CSS and JS files is not working. Unfortunately I couldn't find why this happens.

from mean.

MichaelJCole avatar MichaelJCole commented on June 13, 2024

Hey, I was able to reproduce this on my linux box:

# seems to work
NODE_ENV=production grunt
# get rid of the dist files
rm public/dist/*.*
# Now doesn't work
NODE_ENV=production grunt

In my case, the dist files were not recreated, or included in the HTML.
Here's the output from GET /

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>WriterMustWrite</title>

<!-- General META -->
<meta charset="utf-8">
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">

<!-- Semantic META -->
<meta name="keywords" content="writer, must, write, writing, editor,
publish, publishing, ebook, pro, professional">
 <meta name="description" content="Outline, write, edit and publish.
 Undistracted app for professional writers.">

<!-- Facebook META -->
 <meta property="fb:app_id" content="APP_ID">
<meta property="og:site_name" content="WriterMustWrite">
 <meta property="og:title" content="WriterMustWrite">
<meta property="og:description" content="Outline, write, edit and publish.
 Undistracted app for professional writers.">
 <meta property="og:url" content="http:// localhost:3000/">
<meta property="og:image" content="/img/brand/logo.png">
 <meta property="og:type" content="website">

<!-- Twitter META -->
 <meta name="twitter:title" content="WriterMustWrite">
<meta name="twitter:description" content="Outline, write, edit and publish.
 Undistracted app for professional writers.">
 <meta name="twitter:url" content="http:// localhost:3000/">
<meta name="twitter:image" content="/img/brand/logo.png">

<!-- Fav Icon -->
<link href="/modules/core/img/brand/favicon.ico" rel="shortcut icon"
type="image/x-icon">

<!--Application CSS Files-->
<link rel="stylesheet" href="lib/bootstrap/dist/css/bootstrap.min.css">
 <link rel="stylesheet"
href="lib/bootstrap/dist/css/bootstrap-theme.min.css">

<!-- HTML5 Shim -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
 <![endif]-->
</head>

<body class="ng-cloak">
<header data-ng-include="'/modules/core/views/header.client.view.html'"
class="navbar navbar-fixed-top navbar-inverse"></header>
 <section class="content">
<section class="container">
 <section data-ui-view></section>

</section>
</section>

<!--Embedding The User Object-->
<script type="text/javascript">
 var user = null;
</script>

<!--Application JavaScript Files-->
 <script type="text/javascript" src="lib/angular/angular.min.js"></script>
<script type="text/javascript"
src="lib/angular-resource/angular-resource.min.js"></script>
 <script type="text/javascript"
src="lib/angular-animate/angular-animate.min.js"></script>
<script type="text/javascript"
src="lib/angular-ui-router/release/angular-ui-router.min.js"></script>
 <script type="text/javascript"
src="lib/angular-ui-utils/ui-utils.min.js"></script>
<script type="text/javascript"
src="lib/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>


</body>

</html>

On Thu, May 15, 2014 at 6:09 AM, darksniper87 [email protected]:

It's the same issue that I have. For some reason the grunt task for
minifying the CSS and JS files is not working. Unfortunately I couldn't
find why this happens.


Reply to this email directly or view it on GitHubhttps://github.com//issues/64#issuecomment-43197135
.

Michael Cole
http://Powma.com
(512) 333-4372

from mean.

amoshaviv avatar amoshaviv commented on June 13, 2024

The build task is a separate task before running your application in a production environment you should first run: grunt build, this will minify and recreate the minified application files so you should test your production deployment like this:

$ grunt build
$ NODE_ENV=production grunt

from mean.

MichaelJCole avatar MichaelJCole commented on June 13, 2024

Ok, yep. I'm seeing them now. Thanks!

from mean.

MichaelJCole avatar MichaelJCole commented on June 13, 2024

Hey, this means on Heroku, we'd need a special build-pack: https://github.com/mbuchetics/heroku-buildpack-nodejs-grunt

from mean.

amoshaviv avatar amoshaviv commented on June 13, 2024

Not at all, just make sure you build your files before deploying to heroku, using grunt in production enviornment is a mess, grunt is a development utility it is not really production capable

from mean.

amoshaviv avatar amoshaviv commented on June 13, 2024

I actually would like to incorporate a heroku deploy task

from mean.

MichaelJCole avatar MichaelJCole commented on June 13, 2024

Ok, I saw a pull request about removing the dist/ files from git. If they stay in git, and get built before deployment, that'll work.

A grunt task to configure and deploy a heroku server would be pretty awesome.

from mean.

amobrem avatar amobrem commented on June 13, 2024

I ran grunt build. That wasnt the problem. The problem was fixed when I add the following dependency here('ui.bootstrap.tpls'):
var applicationModuleVendorDependencies = ['ngResource', 'ngCookies', 'ngAnimate', 'ngTouch', 'ngSanitize', 'ui.router', 'ui.bootstrap', 'ui.bootstrap.tpls', 'ui.utils'];

Thats why I think if we add the ngMin grunt task it would resolve the issue as well

from mean.

amoshaviv avatar amoshaviv commented on June 13, 2024

added ngmin in 0.3.1 thank you everyone

from mean.

eshaham avatar eshaham commented on June 13, 2024

I'm setting up continuous integration for my site on Heroku using codeship.
How do I make grunt build, or any equivalent regeneration of dist files, to run on every successful build?

I'd rather not run it manually on every commit.

from mean.

amoshaviv avatar amoshaviv commented on June 13, 2024

Hi @eshaham,

I think you can define the build task as one of the setup commands: http://blog.codeship.io/2013/10/08/how-to-deploy-a-node-js-app-from-github-to-heroku.html?utm_campaign=Q2_2014_landingpage&utm_medium=text&utm_source=tutorials

just use grunt build.

from mean.

eshaham avatar eshaham commented on June 13, 2024

Thanks.
It turns out you can run a custom script on codeship before or after deployment.

from mean.

hiteshvadlamudi avatar hiteshvadlamudi commented on June 13, 2024

I am new to MeanJS and started loving it. I still seem to have this issue.

  1. I created a MeanJS Project. Added a module.
  2. grunt lint and ran the application in development mode - Works Perfect.
  3. grunt build and deploy to heroku or run locally in production mode (after setting NODE_ENV=production) the module doesnt seem to be recognized.

Can someone help ?

from mean.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.