Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
iqbalfn committed Jul 27, 2019
0 parents commit d32d12d
Show file tree
Hide file tree
Showing 20 changed files with 4,865 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
presets: [
[
'@babel/env',
{
loose: true,
modules: false,
exclude: ['transform-typeof-symbol']
}
]
],
plugins: [
'@babel/plugin-proposal-object-rest-spread'
],
env: {
test: {
plugins: [ 'istanbul' ]
}
}
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
47 changes: 47 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
module.exports = function(grunt) {

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

copy: {
docs: {
files: [
{
expand: true,
cwd: 'dist/js/',
src: [
'bootstrap-autocomplete.js',
'bootstrap-autocomplete.js.map'
],
dest: 'docs/js/'
}
]
}
},

run: {
js_compile: {
cmd: 'npm', args: ['run','js-compile']
},
js_minify: {
cmd: 'npm', args: ['run','js-minify']
}
},

watch: {
js: {
files: [
'src/js/*.js'
],
tasks: [
'run:js_compile',
'copy:docs'
]
}
}
})

grunt.loadNpmTasks('grunt-run')
grunt.loadNpmTasks('grunt-contrib-copy')
grunt.loadNpmTasks('grunt-contrib-watch')
}
18 changes: 18 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Copyright 2019 Iqbal Fauzi

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# bootstrap-autocomplete

Text input autocomplete from list, prefect or ajax.
13 changes: 13 additions & 0 deletions build/banner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use strict'

const year = new Date().getFullYear()

function getBanner(pluginFilename) {
return `/*!
* Bootstrap Autocomplete v0.0.1 (https://iqbalfn.github.io/bootstrap-autocomplete/)
* Copyright 2019 Iqbal Fauzi
* Licensed under MIT (https://github.com/iqbalfn/bootstrap-autocomplete/blob/master/LICENSE)
*/`
}

module.exports = getBanner
37 changes: 37 additions & 0 deletions build/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
'use strict'

const path = require('path')
const babel = require('rollup-plugin-babel')
const resolve = require('rollup-plugin-node-resolve')
const banner = require('./banner.js')

let fileDest = 'bootstrap-autocomplete.js'
const external = ['jquery']
const plugins = [
babel({
exclude: 'node_modules/**', // Only transpile our source code
externalHelpersWhitelist: [ // Include only required helpers
'defineProperties',
'createClass',
'inheritsLoose',
'defineProperty',
'objectSpread'
]
})
]
const globals = {
jquery: 'jQuery'
}

module.exports = {
input: path.resolve(__dirname, '../src/js/index.js'),
output: {
banner,
file: path.resolve(__dirname, `../dist/js/${fileDest}`),
format: 'umd',
globals,
name: 'bootstrap-autocomplete'
},
external,
plugins
}
Loading

0 comments on commit d32d12d

Please sign in to comment.