Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Question: Where is build target defined? #6296

Closed
le717 opened this issue Dec 21, 2013 · 3 comments
Closed

Question: Where is build target defined? #6296

le717 opened this issue Dec 21, 2013 · 3 comments

Comments

@le717
Copy link
Contributor

le717 commented Dec 21, 2013

Hello! I just discovered Brackets thanks to the GitHub Pages site update, and am thoroughly enjoying coding with it. Keep up the good work! 👍

I have a question, and I can't seem to find the answer. In #5776, the ability to use un-minified CSS/JS when target is dev and minified when target is dist. I would like to duplicate this ability in my own project, but I have no idea where target is defined, nor where to look (How to Hack on Brackets was of no help).

So, can someone point me in the right direction for duplicating this ability and what I projects I need to download to set it up? I am a beginner Web Designer (though I have a year background in local Python programming), thus I am still new to a lot of this stuff. 😃

Thanks! 😄

@njx
Copy link

njx commented Jan 6, 2014

Hi @le717 - we're going to close this out since it's not a Brackets issue. However, if @jasonsanjose has time he might be able to comment on how we set up the gruntfile and Brackets code to do this. Alternatively, you could try posting on the brackets-dev Google Group.

@njx njx closed this as completed Jan 6, 2014
@jasonsanjose
Copy link
Member

@le717 The dev target is undefined. Here, that defines a default behavior to dynamically compile LESS in-browser, see src/index.html:

    <!--(if target dev)><!-->
    <link rel="stylesheet" type="text/less" href="styles/brackets.less">
    <!--<!(endif)-->

The dist target is defined in the targethtml task defined by https://github.com/changer/grunt-targethtml. In our case, we use this target to use compiled and minified CSS:

    <!--(if target dist)>
    <link rel="stylesheet" type="text/css" href="styles/brackets.min.css">
    <!--<!(endif)-->

If you haven't already, you'll probably want to learn more about Grunt gruntjs.com/getting-started/ and grunt-usemin https://github.com/yeoman/grunt-usemin before using grunt-targethtml.

@le717
Copy link
Contributor Author

le717 commented Jan 6, 2014

@njx No problem, I figured it would be closed since it was not a Brackets issue. 😉

@jasonsanjose Yea, I'll need to read up on Grunt then. I almost assumed it was involved somewhere in here, but I could not tell exactly where.
Thanks for the info! This will really help me in my projects. 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants