mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-24 02:30:13 +00:00
Add ES2015 runtime transpilation sample
This commit is contained in:
5
samples/misc/ES2015Transpilation/wwwroot/js/greeting.js
Normal file
5
samples/misc/ES2015Transpilation/wwwroot/js/greeting.js
Normal file
@@ -0,0 +1,5 @@
|
||||
export default class Greeting {
|
||||
getMessage() {
|
||||
return 'Hello from the ES2015 class';
|
||||
}
|
||||
}
|
||||
3
samples/misc/ES2015Transpilation/wwwroot/js/main.js
Normal file
3
samples/misc/ES2015Transpilation/wwwroot/js/main.js
Normal file
@@ -0,0 +1,3 @@
|
||||
import Greeting from './greeting.js';
|
||||
|
||||
console.log(new Greeting().getMessage());
|
||||
Reference in New Issue
Block a user