Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
AonaSuzutsuki committed Aug 22, 2020
2 parents eaa5e41 + 225215e commit 82a0229
Show file tree
Hide file tree
Showing 16 changed files with 3,216 additions and 59 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
87 changes: 87 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
module.exports = function( grunt ) {
var pkg = grunt.file.readJSON( 'package.json' );

grunt.initConfig( {
pkg: pkg,
/**
* Delete files and directories.
*/
clean: {
build: [ '.tmp', 'dist' ],
release: [ '.tmp' ]
},
/**
* Copy files and directories.
*/
copy: {
html: {
files: [ {
expand: true,
cwd: 'src/html',
src: [ '*.html'],
dest: 'dist'
} ]
}
},

useminPrepare: {
html: 'src/html/*.html',
options: {
dest: 'dist'
}
},
/**
* Combines and compresses CSS and JavaScript, and updates the HTML reference path.
*/
usemin: {
html: 'dist/*.html',
options: {
dest: 'dist'
}
},

uglify: {
options: {
output: {
comments: 'some'
}
},
// dist: {
// files: {
// // Output file: Original file
// 'dist/AutoContentsMenuGenerator.min.js': 'dist/AutoContentsMenuGenerator.js'
// }
// }
},

// concat: {
// files: {
// // Original file
// src : 'src/*.js',
// // Output file
// dest: 'concat/AutoContentsMenuGenerator.js'
// }
// },

/**
* Settings to monitor changes to the folder.
* While running "$ grunt watch", perform the specified task every time there is a change.
* @type {Object}
*/
watch: {
scripts: {
files: [ 'src/css/*.css', 'src/js/*.js' ],
tasks: [ 'build' ]
}
}
} );

Object.keys( pkg.devDependencies ).forEach( function( devDependency ) {
if( devDependency.match( /^grunt\-/ ) ) {
grunt.loadNpmTasks( devDependency );
}
} );

grunt.registerTask( 'build', [ 'clean:build', 'copy', 'useminPrepare', 'concat', 'uglify', 'cssmin', 'usemin', 'clean:release' ] );
grunt.registerTask( 'default', [ 'watch' ] );
};
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ Define an HTML document with headings.
```

### JavaScript
Import AutoContentsMenuJS.min.js.
Import AutoContentsMenuJS.min.js.
\* There is "AutoContentsMenuGenerator.min.js" in "dist/js".
```html
<script type="text/javascript" src="AutoContentsMenuGenerator.min.js"></script>
```
Expand Down
6 changes: 3 additions & 3 deletions sample/AutoMenu.html → dist/AutoMenu.html
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<title>AutoMenu Sample</title>
<link rel="stylesheet" type="text/css" href="AutoMenu.css" />
<link rel="stylesheet" href="css/AutoMenu.min.css">
</head>

<body>
Expand Down Expand Up @@ -65,8 +65,8 @@ <h2>サブ</h2>
</p>
</div>
<h1>見出し</h1>

<script type="text/javascript" src="../src/AutoContentsMenuGenerator.js"></script>
<script src="js/AutoContentsMenuGenerator.min.js"></script>
<script type="text/javascript">
let menu = new AutoContentsMenuGenerator();
menu.registerGroup("span.title");
Expand Down
4 changes: 2 additions & 2 deletions sample/AutoMenu2.html → dist/AutoMenu2.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<title>AutoMenu Sample</title>
<link rel="stylesheet" type="text/css" href="AutoMenu.css" />
<link rel="stylesheet" href="css/AutoMenu.min.css">
</head>

<body>
Expand Down Expand Up @@ -47,7 +47,7 @@ <h2>h2</h2>
</div>
<h1>h1</h1>

<script type="text/javascript" src="../src/AutoContentsMenuGenerator.js"></script>
<script src="js/AutoContentsMenuGenerator.min.js"></script>
<script type="text/javascript">
let menu = new AutoContentsMenuGenerator();
menu.registerGroup(".content-group, .content-group2");
Expand Down
1 change: 1 addition & 0 deletions dist/css/AutoMenu.min.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ol>li{list-style-type:none}
7 changes: 7 additions & 0 deletions dist/js/AutoContentsMenuGenerator.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions min/AutoContentsMenuGenerator.min.js

This file was deleted.

Loading

0 comments on commit 82a0229

Please sign in to comment.