Permalink
Browse files

installed grunt and npm in the project

  • Loading branch information...
1 parent 4e3399d commit daa5cf56c377268ba33834697b7f0aa8c4b12261 @douglasdeodato douglasdeodato committed Aug 24, 2016
Showing with 184 additions and 1 deletion.
  1. +2 −1 .gitignore
  2. +69 −0 Gruntfile.js
  3. +29 −0 package.json
  4. +44 −0 samples/callbacks.html
  5. +40 −0 samples/index.html
View
@@ -1 +1,2 @@
-.DS_Store
+.DS_Store
+node_modules/
View
@@ -0,0 +1,69 @@
+ module.exports = function (grunt) {
+ var config = {};
+
+
+ //src ===============================
+ var src;
+ config.src = src = {
+ sassMain : 'scss/app.scss',
+ distFolder : 'css/app.dist.css',
+ devFolder : 'app.dev.css',
+ sassFolder : 'scss/**/*.scss',
+
+ };
+
+
+ //Watch ===============================
+ config.watch = {
+ scripts: {
+ files: ["<%= src.libFolder %>", "<%= src.sassFolder %>"]
+ ,tasks: ["dev", "sass:dist"]
+ //,tasks: ["dev",'sass:dist']
+ }
+ }
+
+
+ //Sass ===============================
+ var sass;
+ config.sass = sass = {};
+
+ //distribution
+ sass.dist = {
+ options: {
+ style: "compressed",
+ noCache: true,
+ sourcemap: 'none',
+ update:true
+ }
+ , files: {
+ "<%= src.distFolder %>" : "<%= src.sassMain %>"
+ }
+ };
+
+ //development env.
+ sass.dev = {
+ options: {
+ style: "expanded",
+ lineNumber: true,
+ }
+ , files: {
+ "<%= src.devFolder %>" : "<%= src.sassMain %>"
+ }
+ };
+
+
+
+ //Register custom tasks ===============================
+ grunt.registerTask('default',['dev']);
+ grunt.registerTask('dev', ['sass:dev']);
+ grunt.registerTask('dist',['sass:dist']);
+ require('time-grunt')(grunt);
+ require('load-grunt-tasks')(grunt, {
+ scope: 'devDependencies'
+ });
+
+
+ //General setup ===============================
+ grunt.initConfig(config);
+
+};
View
@@ -0,0 +1,29 @@
+{
+ "name": "multiselect",
+ "version": "0.9.12",
+ "description": "A user-friendlier drop-in replacement for the standard select with multiple attribute activated.",
+ "main": "Gruntfile.js",
+ "directories": {
+ "test": "test"
+ },
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/douglasdeodato/multi-select.git"
+ },
+ "author": "",
+ "license": "WTFPL",
+ "bugs": {
+ "url": "https://github.com/lou/multi-select/issues"
+ },
+ "devDependencies": {
+ "grunt": "*",
+ "load-grunt-tasks": "^3.5.0",
+ "time-grunt": "^1.3.0",
+ "grunt-contrib-sass": "*",
+ "grunt-contrib-watch": "*"
+ },
+ "homepage": "https://github.com/douglasdeodato/multi-select#readme"
+}
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html lang="">
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="description" content="">
+ <meta name="author" content="">
+ <title>Title Page</title>
+ <!-- Bootstrap CSS -->
+ <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
+ <link rel="stylesheet" type="text/css" href="../css/multi-select.css">
+</head>
+<body>
+ <!-- start -->
+ <h1>Callbaks</h1>
+ <select id='callbacks' multiple='multiple'>
+ <option value='elem_1'>elem 1</option>
+ <option value='elem_2'>elem 2</option>
+ <option value='elem_3'>elem 3</option>
+ <option value='elem_4'>elem 4</option>
+ ...
+ <option value='elem_100'>elem 100</option>
+</select>
+ <!-- ends -->
+ <!-- jQuery -->
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
+ <!-- Bootstrap JavaScript -->
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha/js/bootstrap.min.js"></script>
+ <script src="../js/jquery.multi-select.js"></script>
+ <script type="text/javascript">
+ // run callbacks
+ $('#callbacks').multiSelect({
+ afterSelect: function(values){
+ alert("Select value: "+values);
+ },
+ afterDeselect: function(values){
+ alert("Deselect value: "+values);
+ }
+ });
+ </script>
+</body>
+
+</html>
View
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html lang="">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="description" content="">
+ <meta name="author" content="">
+ <title>Title Page</title>
+ <!-- Bootstrap CSS -->
+ <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
+ <!-- font awesome -->
+ <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
+ <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
+ <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+ <!--[if lt IE 9]>
+ <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
+ <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
+ <![endif]-->
+ <!-- Angular 1.5.7-->
+
+ </head>
+ <body>
+ <h1 class="text-center">Multi Select Samples Page</h1>
+
+<div class="container">
+<div class="page-header" id="demos">
+ <h2>Demos</h2>
+ </div>
+
+ <a href="Pre-selected-options.html"> <h3>Pre-selected options</h3></a>
+ <a href="callbacks.html"> <h3>Callbacks</h3></a>
+</div>
+
+ <!-- jQuery -->
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
+ <!-- Bootstrap JavaScript -->
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha/js/bootstrap.min.js"></script>
+ </body>
+</html>

0 comments on commit daa5cf5

Please sign in to comment.