Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am bojzi on github.
  • I am bojzi (https://keybase.io/bojzi) on keybase.
  • I have a public key ASB0myVygyBNwbYn6iKCAfwj8V7zyslpxID4z9aVtpfPYwo

To claim this, I am signing this object:

@SomeKay
SomeKay / ambient.ts
Created Aug 24, 2016
Ambient declaration
View ambient.ts
declare var someVariable:any;
someVariable.doSomething(); // compiler won't make problems here
View ng-deploy.sh
ng github-pages:deploy
View angular-cli.sh
npm install -g angular-cli
ng new my-angular-application
cd my-angular-application
ng serve
@SomeKay
SomeKay / package.json
Created Aug 20, 2016
Package.json in CSS repository
View package.json
{
"name": "blog-css-architecture",
"version": "1.0.0",
"description": "Main project for the CSS architecture blog",
"scripts": {
"build": "node-sass styles.scss styles.css"
},
"author": "Kristian Poslek <kristian.poslek@gmail.com>",
"license": "MIT",
"devDependencies": {
@SomeKay
SomeKay / styles.scss
Created Aug 20, 2016
Updated imports
View styles.scss
@import "submodules/bootstrap/assets/stylesheets/bootstrap";
$almostBlack: #333;
html, body {
background-color: $almostBlack;
color: $gray-light;
}
View pulling-out-css-dependency.sh
// Pull the dependency out into a submodule
cd submodules/styles
git submodule add https://github.com/comsysto/blog-css-architecture-css-dependency submodules/bootstrap
mv bootstrap-sass-master/* submodules/bootstrap
rm -rf bootstrap-sass-master
cd submodules/bootstrap
git add .
git commit -m "pulled out CSS dependency"
git push
// Update your CSS repository with the new reference
@SomeKay
SomeKay / package.json
Created Aug 20, 2016
Modified package.json with CSS pulling
View package.json
{
...
"main": "index.js",
"scripts": {
"start": "node server.js",
"build": "node-sass --include-path styles styles/styles.scss styles/styles.css",
"getCss": "cp submodules/styles/styles.css styles/styles.css"
}
...
}
@SomeKay
SomeKay / pulling-out-css-2.sh
Created Aug 20, 2016
Pulling out CSS sources 2
View pulling-out-css-2.sh
cd submodules/styles
git add .
git commit -m "pulling out source css"
git push
cd ..
cd ..
git add .
git commit -m "pulled out source css"
git push
@SomeKay
SomeKay / css-submodule.sh
Created Aug 20, 2016
Pulling out CSS sources
View css-submodule.sh
mkdir submodules
git submodule add https://github.com/comsysto/blog-css-architecture-css-repository submodules/styles
mv styles/* submodules/styles
rm styles