Coder Social home page Coder Social logo

slides--the-power-of-css's Introduction

Starter Environment

What's set up here:

  • Sass (LibSass)
  • Autoprefixer
  • CSS Minification
  • JSHint
  • Scss Lint (based on this config)
  • HTML Minification
  • BrowserSync
  • Image Minification
  • GH-Pages deployment from dist/ folder

To Get Started:

  1. Install node and make sure npm (Node Package Manager) is also installed
  2. Clone this repo with git clone https://github.com/una/gulp-starter-env (in the terminal) or download the zip
  3. In the terminal, cd (change directory) to the folder containing your project. (i.e. if I start at ~ and I have a Dev folder on my Desktop containing this project, I might type cd Desktop/Dev/gulp-starter-env). Alternatively, you can type cd and drag the location of the folder into your terminal and hit enter.
  4. When inside the directory which contains this project in the terminal, type npm install. If (and only if) you're having trouble with npm install, try sudo npm install -- this makes you act as a super user
  5. In the terminal, enter gulp
  6. Take note of the Access URLs provided in your terminal. Your web page should pop up at http://localhost:3000. You can access this same page on your various devices on the same wifi network with the provided External URL. You can share the External URL with coworkers and they'll see whats on your screen.
  7. Edit your Sass code inside of the scss folder. You can make subfolders inside of that to better organize your code. Prefix your sass files with an underscore. More info on using @import to organize your files here
  8. Your minified files will be automagically created and updated in dist/. It will create your optimized CSS, HTML, and javascript files for you. Never edit files within the dist/ folder. (Dist stands for Distribution)
  9. Keep gulp running while you're making changes. When you want to close out of the gulp task, in the terminal, hit ctrl + C

Linting

This linter is the only ruby dependency in this project (and it's optional)

File Linting is where you read your file to make sure that your code conforms to standards. You should be doing this continuously.

If you're using a text editor like Sublime, I'd recommend installing SublimeLinter and SublimeLinter-contrib-scss-lint. You can also lint with gulp inside of your terminal by running gulp scss-lint. Similar linters are available for other text editors.

Deploying to gh-pages

You can run gulp deploy to push your site to the gh-pages branch. Then, you can navigate to it via http://< your-github-username >.github.io/< project-name > Note: this doesn't work if your project name is < your-github-username >.github.io.

Commonly Confusing Terms

  • cd: change directory (a terminal command). Make sure you have a space between cd and the location you are navigating to
  • repo: repository (this is a 'repository' of code)
  • sudo: you get access as a 'super user' of your system (you can override permissions)
  • npm: node project manager -- the command line task manager that is installing everything inside of package.json
  • package.json: a file with information about your project. This is also where your list of dependencies lives which npm installs
  • gulp: a task manager that is running a bunch of scripts to make this environment work
  • dist: distribution folder -- don't edit anything in here. It is where your gulp task builds into
  • scss: a Sass syntax that imitates CSS

slides--the-power-of-css's People

Contributors

akashfoss avatar fredericmarx avatar iamcarrico avatar jeffersonlam avatar lauweijie avatar onishiweb avatar una avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

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.