CodeKit2 icon indicating copy to clipboard operation
CodeKit2 copied to clipboard

Feature request : simple copy

Open potsky opened this issue 11 years ago • 11 comments

As grunt does. This feature is essential to copy only wanted bower assets in the project.

I never include bower_components in distribution. But if CK update bower components, I need to manually copy wanted files to project... and then miss some if course !

potsky avatar Apr 19 '14 15:04 potsky

... I don't understand. If you don't need certain bower assets in your project, don't install them in the first place.

bdkjones avatar May 28 '14 04:05 bdkjones

Take Bootstrap example. You need Bootstrap in your project so you install it with bower. You don't want to publish all bower_components directory but only the javascript, css and fonts parts.

Here is the folder structure :

bower_components
sources
sources/js
sources/sass
www
www/js
www/css
www/fonts

In sources/js/main.js (minified to www/js/main-ck.js) :

//@codekit-prepend "../../bower_components/jquery/dist/jquery.js"
//@codekit-prepend "../../bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/affix.js"
//@codekit-prepend "../../bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/alert.js"
//@codekit-prepend "../../bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/button.js"
//@codekit-prepend "../../bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/carousel.js"
//@codekit-prepend "../../bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/collapse.js"
//@codekit-prepend "../../bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/dropdown.js"
//@codekit-prepend "../../bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/tab.js"
//@codekit-prepend "../../bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/transition.js"
//@codekit-prepend "../../bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/scrollspy.js"
//@codekit-prepend "../../bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/modal.js"
//@codekit-prepend "../../bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/tooltip.js"
//@codekit-prepend "../../bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/popover.js"

In sources/sass/main.css (minified to www/css/main.css) :

@import "../../bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap.scss";
body {
    background-color: #fff;
}

So if bower assets are updated, they will be recompiled next time : perfect.

But what about fonts/glyphicons ? I need to copy them manually. And for other assets, you often need to copy images, swf, etc...

With grunt, you can simply copy files from a location to an other one. I could be nice if we could do the same thing with CK ! With grunt, you just run grunt and you know that you don't bother with anything else, everything will be ok. I understand too that CK is not grunt. In grunt, I launch Unit Tests before publishing and I don't expect to do the same thing with CK. But copying assets is really close to include other assets parts in JS and SASS for example.

potsky avatar May 28 '14 06:05 potsky

+1

fedosov avatar Oct 18 '14 15:10 fedosov

+2 :)

road42 avatar Oct 29 '14 20:10 road42

Ahh... Nice app, but I am switched to Gulp because of that :(

fedosov avatar Nov 23 '14 16:11 fedosov

+1 I also try to figure out how do it, not sure how hooks works, is possible to do this requirement?

jenux avatar Jan 29 '15 03:01 jenux

+1 I saw this but haven't tried it: https://www.snip2code.com/Snippet/306685/Bash--Add-a-post-compile-hook-to-CodeKit

fhickler avatar Mar 04 '15 20:03 fhickler

i suppose this is not on the agenda? :] would be really cool to have this feature thou...

pasevin avatar Oct 20 '15 22:10 pasevin

Oh, it's on the agenda; fear not.

bdkjones avatar Oct 20 '15 22:10 bdkjones

wow that was fast :] thanks for the reassurance!

pasevin avatar Oct 20 '15 22:10 pasevin

+1

I'm feeling like a fiend over here waiting for CK3! Ahhh @bdkjones you've created this vicious Apple-esque anticipation around CodeKit.

"Just take my damn money!"

kylegillen avatar Feb 16 '16 14:02 kylegillen