Skip to content

Commit

Permalink
Major code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
tivie committed Jan 15, 2015
1 parent 548becf commit eae5f0e
Show file tree
Hide file tree
Showing 137 changed files with 3,694 additions and 9,354 deletions.
7 changes: 3 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/test export-ignore
.gitattributes export-ignore
.gitignore export-ignore
/perlMarkdown export-ignore
/example export-ignore
grunt.js export-ignore

.jshintignore export-ignore
.travis.yml export-ignore
Gruntfile.js export-ignore
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea/
build/
.DS_Store
node_modules
npm-debug.log
.idea/
3 changes: 2 additions & 1 deletion .jshintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Gruntfile.js
dist/**/*.js
dist/**/*.js
build/**/*.js
27 changes: 27 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": "nofunc",
"newcap": true,
"noarg": true,
"quotmark": "single",
"undef": false,
"unused": true,
"strict": false,
"trailing": true,
"smarttabs": true,
"globals": {
"angular": true,
"module": true,
"define": true,
"window": true,
"showdown": true
}
}
39 changes: 39 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Credits
=======
- Showdown v2
* [Estevão Santos](http://soares-dos-santos.com)<br/>
Code Refactoring and project maintainer

- Showdown v1
* [Corey Innis](http://github.com/coreyti):<br/>
GitHub project maintainer
* [Remy Sharp](https://github.com/remy/):<br/>
CommonJS-compatibility and more
* [Konstantin Käfer](https://github.com/kkaefer/):<br/>
CommonJS packaging
* [Roger Braun](https://github.com/rogerbraun):<br/>
Github-style code blocks
* [Dominic Tarr](https://github.com/dominictarr):<br/>
Documentation
* [Cat Chen](https://github.com/CatChen):<br/>
Export fix
* [Titus Stone](https://github.com/tstone):<br/>
Mocha tests, extension mechanism, and bug fixes
* [Rob Sutherland](https://github.com/roberocity):<br/>
The idea that lead to extensions
* [Pavel Lang](https://github.com/langpavel):<br/>
Code cleanup
* [Ben Combee](https://github.com/unwiredben):<br/>
Regex optimization
* [Adam Backstrom](https://github.com/abackstrom):<br/>
WebKit bugfix
* [Pascal Deschênes](https://github.com/pdeschen):<br/>
Grunt support, extension fixes + additions, packaging improvements, documentation
* [Estevão Santos](http://soares-dos-santos.com)<br/>
Bug fixing and later maintainer

- Original Project
* [John Gruber](http://daringfireball.net/projects/markdown/)<br/>
Author of Markdown
* [John Fraser](http://attacklab.net/)
Author of Showdown
68 changes: 20 additions & 48 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,13 @@ module.exports = function (grunt) {
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';',
sourceMap: true
sourceMap: true,
banner: ";/*! <%= pkg.name %> <%= grunt.template.today('dd-mm-yyyy') %> */\n(function(){\n 'use strict';\n",
footer: "}).call(this)"
},
dist: {
src: ['src/showdown.js', 'src/*.js'],
dest: 'compressed/<%= pkg.name %>.js'
},
github_ext: {
src: ['src/extensions/github.js'],
dest: 'compressed/extensions/github.min.js'
},
prettify_ext: {
src: ['src/extensions/prettify.js'],
dest: 'compressed/extensions/prettify.min.js'
},
table_ext: {
src: ['src/extensions/table.js'],
dest: 'compressed/extensions/table.min.js'
},
twitter_ext: {
src: ['src/extensions/twitter.js'],
dest: 'compressed/extensions/twitter.min.js'
src: ['src/showdown.js', 'src/helpers.js', 'src/subParsers/*.js', 'src/loader.js'],
dest: 'dist/<%= pkg.name %>.js'
}
},
uglify: {
Expand All @@ -39,41 +24,21 @@ module.exports = function (grunt) {
},
dist: {
files: {
'compressed/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
}
},
github_ext: {
files: {
'compressed/extensions/github.min.js': ['<%= concat.github_ext.dest %>']
}
},
prettify_ext: {
files: {
'compressed/extensions/prettify.min.js': ['<%= concat.prettify_ext.dest %>']
}
},
table_ext: {
files: {
'compressed/extensions/table.min.js': ['<%= concat.table_ext.dest %>']
}
},
twitter_ext: {
files: {
'compressed/extensions/twitter.min.js': ['<%= concat.twitter_ext.dest %>']
'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
}
}
},
jshint: {
files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js']
files: ['Gruntfile.js', 'src/**/*.js']
},
simplemocha: {
all: {
src: 'test/run.js',
src: 'test/**/*.js',
options: {
globals: ['should'],
timeout: 3000,
ignoreLeaks: false,
ui: 'bdd'
reporter: 'spec'
}
}
}
Expand All @@ -85,16 +50,23 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-simple-mocha');

// test
/*
grunt.registerTask('sourceMapsSupport', function() {
'use strict';
//# sourceMappingURL=path/to/source.map
sourceMapSupport.install();
});
*/
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('test', ['simplemocha']);
grunt.registerTask('test', ['jshint', 'concat', 'simplemocha']);
grunt.registerTask('test-without-building', ['simplemocha']);

// build with uglify
grunt.registerTask('build', ['concat', 'uglify']);

// Build with closure compiler
grunt.registerTask('build-with-closure', ['test', 'concat', 'closure-compiler']);

// Default task(s).
grunt.registerTask('default', []);


};
Loading

4 comments on commit eae5f0e

@tivie
Copy link
Member Author

@tivie tivie commented on eae5f0e Jan 16, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should fix browserify issues

Closes #122, closes #109, closes #50, closes #104, closes #118, closes #108, closes #56

@tivie
Copy link
Member Author

@tivie tivie commented on eae5f0e Jan 16, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it should:

Close #123

@tivie
Copy link
Member Author

@tivie tivie commented on eae5f0e Jan 17, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closes #68

@tivie
Copy link
Member Author

@tivie tivie commented on eae5f0e Jan 17, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closes #76

Please sign in to comment.