Browse Source

better gruntfile, add vendor, add README

nettoyage_css_et_html
Shikiryu 7 years ago
parent
commit
a85bb90aaf
  1. 17
      Gruntfile.js
  2. 41
      README.MD
  3. 1
      dist/css/motsmeles.css
  4. 23
      dist/index.html
  5. 7
      dist/js/fabric.1.4.0.min.js
  6. 2
      dist/js/motsmeles.min.js
  7. 2
      package.json
  8. 2
      src/index.html
  9. 21142
      vendor/fabric.1.4.0.js
  10. 7
      vendor/fabric.1.4.0.min.js

17
Gruntfile.js

@ -21,15 +21,26 @@ module.exports = function(grunt) {
},
jshint: {
all: ['src/js/*.js']
},
copy: {
main: {
files: [
{expand: true, cwd: 'src/', src: '*.html', dest: 'dist/', filter: 'isFile'},
{expand: true, cwd: 'vendor/', src: '*.min.js', dest: 'dist/js/', filter: 'isFile'}
]
}
},
clean: {
dist: ['dist/']
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
// Default task(s).
grunt.registerTask('default', ['jshint', 'uglify','cssmin' ]);
grunt.registerTask('default', ['clean', 'jshint', 'uglify', 'cssmin', 'copy']);
};

41
README.MD

@ -0,0 +1,41 @@
# Mots mélés
This game is about words to search in a grid.
It first started as a personal side project, but now, I want to give it life.
## How it works
Pretty simple. You gave it a grid of letter like this
```var GRID = [
['S','S','S','A','U','B','A','G','N','E'],
['E','P','A','A','M','V','E','N','C','E'],
['L','U','L','M','I','R','A','M','A','S'],
['R','A','O','G','E','X','A','C','O','E'],
['A','L','N','E','G','N','A','R','O','R'],
['T','O','U','L','O','N','G','L','R','E'],
['N','D','S','T','N','U','E','I','E','Y'],
['I','N','P','E','E','N','I','L','D','H'],
['C','A','S','S','U','J','E','R','F','L'],
['E','B','E','L','S','I','S','S','A','C']
];```
And a list of words to find like this
> var words = ['AIX','APT','ARLES','AUBAGNE','AUPS','AVIGNON','BANDOL','CANNES','CASSIS','DIGNE','FREJUS','HYERES','LUNEL','MIRAMAS','NICE','ORANGE','SALON','SORGUES','TOULON','VENCE'];
And that should be it. (well, you need 2 other parameters I'm gonna get rid of.
## TODO
### v0.0.2
* diagonal detection (for now, it's only vertical and horizontal words)
* get rid of those 2 useless parameters
* better protection against user
### v0.0.3
* make a user friendly "generator"
** interface where a user can enter a grid and a list of words easily giving an output like the JS one right now
### v0.0.4
* make an automatic generator
** give it a size, it'll fetch words via an API and make the grid with those.

1
dist/css/motsmeles.css

File diff suppressed because one or more lines are too long

23
dist/index.html

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<title>Mot mélés</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="js/fabric.1.4.0.min.js"></script>
<script src="js/const.js"></script>
<link rel="stylesheet" type="text/css" href="css/style.css" media="screen" />
</head>
<body>
<h1>Mots Mélés</h1>
<div id="playground">
<div id="firstGame">
<canvas id="c"></canvas>
<ul id="words">
</ul>
</div>
</div>
<script src="js/script.js"></script>
</body>
</html>

7
dist/js/fabric.1.4.0.min.js

File diff suppressed because one or more lines are too long

2
dist/js/motsmeles.min.js

File diff suppressed because one or more lines are too long

2
package.json

@ -4,6 +4,8 @@
"description": "a simple 'mots mélés' game",
"author": "Shikiryu",
"devDependencies": {
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-copy": "^0.7.0",
"grunt-contrib-cssmin": "^0.11.0",
"grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-uglify": "^0.7.0"

2
src/index.html

@ -3,7 +3,7 @@
<head>
<title>Mot mélés</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.4.0/fabric.min.js"></script>
<script src="js/fabric.1.4.0.min.js"></script>
<script src="js/const.js"></script>
<link rel="stylesheet" type="text/css" href="css/style.css" media="screen" />
</head>

21142
vendor/fabric.1.4.0.js

File diff suppressed because it is too large

7
vendor/fabric.1.4.0.min.js

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save