Commit 6361c382 authored by Panayiotis Lipiridis's avatar Panayiotis Lipiridis
Browse files

Merged in topless/country-flag-icons-grunt (pull request #1)

Grunt integration
parents 02276af7 d8a0881f
Loading
Loading
Loading
Loading

Gruntfile.coffee

0 → 100644
+45 −0
Original line number Diff line number Diff line
module.exports = (grunt)->
  SRC_DIR = "less"
  TARGET_DIR = "css"

  grunt.initConfig
    clean:
      main:
        src: TARGET_DIR

    less:
      app_css:
        src: "#{SRC_DIR}/country-flag-icons.less"
        dest: "#{TARGET_DIR}/country-flag-icons.css"

    # dev only
    watch:
      build:
        options:
          base: SRC_DIR
          keepalive: true
        files: ["#{SRC_DIR}/**/*.less"]
        tasks: ["less"]
      css:
        options:
          livereload: true
        files: "#{TARGET_DIR}/country-flag-icons.css"
      html_templates:
        options:
          livereload: true
        files: 'index.html'

    cssmin:
      app_css:
        src: "#{TARGET_DIR}/country-flag-icons.css"
        dest: "#{TARGET_DIR}/country-flag-icons.css"


    grunt.loadNpmTasks("grunt-contrib-clean")
    grunt.loadNpmTasks("grunt-contrib-less")
    grunt.loadNpmTasks("grunt-contrib-cssmin")
    grunt.loadNpmTasks("grunt-contrib-watch")

    grunt.registerTask("default", ["clean", "build"])
    grunt.registerTask("build", ["less", "watch"])
    grunt.registerTask("dist", ["clean", "less", "cssmin"])
+17 −0
Original line number Diff line number Diff line
.flag-icon {
  position: relative;
  top: 1px;
  display: inline-block;
  background-size: contain;
  background-position: 50%;
  background-repeat: no-repeat;
  width: 1.3333333333333333em;
  line-height: 1;
  box-sizing: border-box;
}
.flag-icon:before {
  content: "\00a0";
}
.flag-icon-gr {
  background-image: url(../flags/4x3/gb.svg);
}
+1 −2
Original line number Diff line number Diff line
@@ -7,10 +7,8 @@
    <meta name="author" content="">

    <title>country-flag-icons</title>

    <link href="./dist/bootstrap.min.css" rel="stylesheet">
    <link href="./css/country-flag-icons.css" rel="stylesheet">
    <link rel="stylesheet/less" type="text/css" href="./less/country-flag-icons.less" />
  </head>

  <body>
@@ -86,5 +84,6 @@
      </p>
    </div>
    <script src="./dist/less-1.4.1.min.js"></script>
    <script src="http://localhost:35729/livereload.js"></script>
  </body>
</html>
+4 −2
Original line number Diff line number Diff line
@@ -3,7 +3,9 @@
  "version": "0.1.0",
  "devDependencies": {
    "grunt": "~0.4.1",
    "grunt-contrib-less": "~0.5",
    "grunt-contrib-watch": "~0.5"
    "grunt-contrib-clean":"0.4.0",
    "grunt-contrib-less":"0.6.4",
    "grunt-contrib-cssmin":"0.5.0",
    "grunt-contrib-watch": "0.5.1"
  }
}
+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

Loading